Giter VIP home page Giter VIP logo

Comments (25)

thednp avatar thednp commented on July 16, 2024

It already closes on focusout, but not on ESC key. http://thednp.github.io/bootstrap.native/#exampleDropdown

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

Hmm. It doesn't over here -> http://sendvid.com/kyizc0dk
Any idea on this matter? It's a standard implementation.

http://pastebin.com/sTmyYWdr -> HTML

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Make sure the data-toggle="dropdown" element is not targeted by other function as in my demo there is no such issue.

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

In Chrome it works indeed, but not in Safari (mac) nor Firefox (mac) (doesn't work in the demo ether).

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

I confirm the issue on Safari (Win). I will have a look asap.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Since I am not able to test on Safari please help me fix it:

  • Create a local copy of the demo,
  • only add the dropdown.js file to the demo
  • change this line to this
self.menu.addEventListener('focusout', self.close, false);

Let me know if that fixes the issue on both Safari and Firefox.
Thank you

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

Sadly no. The close function is not fired in Safari or Firefox.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

OK, I'll look into it ASAP.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Please have a little time and test all plugins and report back any issue you can find on your MAC, I really want to solve all of the issues.

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

Very well. I'll go over everything during the weekend.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Thanks so much.

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

In the Tab section the first dropdown cannot be closed in Safari (Mac), yet the second dropdown (in the changing content) can be closed when clicking outside of it. So it works over there tho, but nowhere else.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

I opened Safari 5.1 for Win and I can see

ReferenceError: Can't find variable: Window which means the Window polyfil is missing, I think this must be the cause in my computer, but not sure about yours.

Please also report any error in your log

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

I don't get any error, but if the window polyfill isn't working, that might be the cause indeed.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

I see, perhaps your Safari version is latest and there is no error anyway.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Please check if the dropdowns in the right side also don't close on clicking outside.

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

Yes, both the one with the label "pill" and the label "dropdown" on the right close on clicking outside.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Good, in that case I have to check original plugins, perhaps there is something I missed with HTML specific attributes in the demo.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Update: I think this must be due to the fact that not all elements support blur and focusout, as the first 2 examples in the left side are both of type <button> and they may not support those types of events or the events have been implemented incomplete into the Safari browser.
Check this for a reference. I'll see if I can find a fix for that.

Update 2 It seems there is nothing we can do about it for now, I will probably update the demo to use A tags instead of BUTTON to make it work in Safari.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Final Update
The issue is completely busted. I also implemented Esc dismiss.

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

Busted in terms of "it works now"? I tried the demo but still the same.. (esc doesn't work ether) or is the demo not updated yet?

The Esc dismiss is not triggered on chrome ether.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Yes, the demo is not yet updated, I only committed to the master so far. Once I finish updating the doc I will update the demo as well.

Please download files from master repo and test them on your device.

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Please check demo and the updated doc.

from bootstrap.native.

warrebuysse avatar warrebuysse commented on July 16, 2024

Alright works perfectly! GJ man!

from bootstrap.native.

thednp avatar thednp commented on July 16, 2024

Alrighty, CDN updated, soon npm as well.

from bootstrap.native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.