Comments (25)
It already closes on focusout
, but not on ESC
key. http://thednp.github.io/bootstrap.native/#exampleDropdown
from bootstrap.native.
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.
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.
In Chrome it works indeed, but not in Safari (mac) nor Firefox (mac) (doesn't work in the demo ether).
from bootstrap.native.
I confirm the issue on Safari (Win). I will have a look asap.
from bootstrap.native.
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.
Sadly no. The close function is not fired in Safari or Firefox.
from bootstrap.native.
OK, I'll look into it ASAP.
from bootstrap.native.
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.
Very well. I'll go over everything during the weekend.
from bootstrap.native.
Thanks so much.
from bootstrap.native.
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.
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.
I don't get any error, but if the window polyfill isn't working, that might be the cause indeed.
from bootstrap.native.
I see, perhaps your Safari version is latest and there is no error anyway.
from bootstrap.native.
Please check if the dropdowns in the right side also don't close on clicking outside.
from bootstrap.native.
Yes, both the one with the label "pill" and the label "dropdown" on the right close on clicking outside.
from bootstrap.native.
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.
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.
Final Update
The issue is completely busted. I also implemented Esc
dismiss.
from bootstrap.native.
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.
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.
Please check demo and the updated doc.
from bootstrap.native.
Alright works perfectly! GJ man!
from bootstrap.native.
Alrighty, CDN updated, soon npm as well.
from bootstrap.native.
Related Issues (20)
- tab issues HOT 8
- getInstance behavior change between v4.1 and v4.2? HOT 4
- Popover positioning within sidebar with position fixed HOT 10
- types location needs to be fixed in package.json HOT 1
- dorpdown not support foreach
- Issues with closing a dropdown HOT 4
- offcanvas toggle bottom HOT 3
- BSN 5.0 comes with full Typescript source HOT 1
- Popover overflows bottom HOT 10
- Navbar with off-canvas drawer is hidden by backdrop HOT 5
- Popover button HOT 3
- Replace Bootstrap 4 HOT 1
- Where are the bootstrap 4 docs? HOT 1
- about source code HOT 5
- Dropdown menu closes instantly if user clickes on a span element inside the triggering button HOT 6
- exception when `isEmptyAnchor` called with SVG <use> tag HOT 6
- Bootstrap 4 to BSN migration HOT 2
- Should not import the named export 'version' HOT 2
- Modal close buttons not working when launching via instance.show() HOT 3
- How to enable tree shaking? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap.native.