-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close button not working on Chrome #6
Comments
Hmmm. So far I can't reproduce on Chrome Version 42.0.2311.152 m. Are there any more details that might help? |
I got this reported by a user, and encounter it myself too. I myself am running Chrome Version 42.0.2311.152 (64-bit), Linux Mint, and my laptop has a touch screen (could this be related to issue #4?). Via saucelabs I tested the jsfiddle on Chrome 42 on Win 7, Win 8, and Linux. All runs fine there. So it seems not to be related to OS. Could it be touch screen related? |
I can confirm the same behaviour. It works in firefox, but not chrome. My chrome version is Version 42.0.2311.152 m Javascript console did not show any error. |
@mofosyne do you have a touch screen too? And what OS are you using? |
surface pro 3 - windows 8.1 Touchscreen yes. Didn't use it... huh? touching the screen works. |
Ah, same here: the modal works when using touch screen, not when using the mouse. |
Hmm this is troublesome. I don't have a touch device (besides my phone that has chrome mobile, but I couldn't reproduce). If anyone has the time (and a touch device with the bug), I would like to know if using the "click" event instead of "mousedown" fixes it. If you get the unminified version, this would be the line to change: Line 55 in 5acbf5f
Thanks for reporting and investigating. |
Ok this is funny. The problem does only occur with the minified file Now I see that nanomodal.js was last updated 2 months ago, whilst the last update of |
Oh yeah... that must be it. Looking at the commit logs, we didn't update the minified version. Oops. Well... I just now re committed the fix, this time actually putting the fix in the source files. I rebuilt and both min and unmin should be ok now. I'll have to update NPM too. Thanks for finding that. |
Ok great. btw I'm not sure why you use two listeners for |
Basically, someone created issue #4 . They have a link to a stack overflow, although it talks about blackberry devices... I thought the problem was with Microsoft surface devices. So you have a surface device and it works with just click? I don't have these devices so I can't test. Anyway... the idea was to hack in a solution that will fire a "click" event no matter what device you have. |
From all possible events in the web world I would expect the The stackoverflow issue seems to address a different problem: the famous 300ms delay between a touch and the |
Are you sure that the click event works on all devices (both touch and multi-input devices)? I was pretty sure I ran into a situation with some device that didn't like the click event but maybe that was some other issue. Anyway if you are sure, I would be happy to simplify the code to just use the click event. I'm not really concerned with a "sluggish" feel from the 300ms problem. My main concern is that it "just works" on as many devices as possible. |
I'm quite sure about that, onclick is the oldest event handler there is, but I don't know if there are obscure (mobile?) browsers not supporting it. |
The Close button doesn't work anymore on the latest version of Chrome, nor clicking on the overlay around the modal. Works fine on FireFox though.
To reproduce: On Chrome 42, click "Open Modal 1" in http://jsfiddle.net/aKL44/3/, then try to click on the Close button or outside of the modal.
The text was updated successfully, but these errors were encountered: