#15106 closed bug (notabug)
Preventing mouseup on the Chrome datepicker causes problems
Reported by: | kevin-brown | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery Version: 2.1.1, 2.0.3, 1.10.2
OS: Ubuntu 14.04 LTS
Browser: Chrome 34.0.1847.137 (Stable)
Short test case: http://jsfiddle.net/RpqEq/
Full test case: http://pastebin.com/da4EMTLQ
Working test case: http://jsfiddle.net/RpqEq/1/
Steps to reproduce:
- Load up the short test case
- Hover over the date picker (so the controls become visible)
- Click "An amazing button", observe that the click event is handled.
- Clear the value (using the "x" on the date picker)
- Click "An amazing button", observe that the click event is not handled.
Image demonstrating the issue: https://i.imgur.com/koCKFnx.gif
Details:
The mouseup
event is being caught on the document
and cancelled using return false;
. Catching the mouseup
event is causing Chromium to not fire click events on other object on the page. The same problems happen using evt.preventDefault()
, but do not happen when the event is caught using addEventListener
without jQuery.
Change History (3)
comment:1 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:2 Changed 9 years ago by
Thanks for the response. I am aware that return false;
just calls preventDefault
(and stopPropagation
, but that's not the issue). In the new fiddle, only stopPropagation
is called and the issue does not appear (because it's a preventDefault
issue). With preventDefault
, the issue still happens.
Though, considering this happens without jQuery (I didn't realize preventDefault
was part of standard events as well), should this be considered a possible Chromium issue, or am I missing something obvious?
comment:3 Changed 9 years ago by
If this is only happening on Chrome, and it is happening without jQuery, and it seems like the behavior is wrong, then it sounds like a bug in Chrome. I see no behavior difference when you use both stopPropagation()
and preventDefault()
http://jsfiddle.net/RpqEq/3/