Open
Bug 1448580
Opened 8 years ago
Updated 3 years ago
The mouse up event is handled after the click event
Categories
(Core :: DOM: Events, defect, P3)
Tracking
()
NEW
People
(Reporter: github, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180317143930
Steps to reproduce:
The summary I left seems a bit cryptic, I answered my own stackoverflow post with a better explanation, if indeed that is the explanation for this behavior. There is also minimal working code on the same post.
https://stackoverflow.com/questions/49465441/im-having-trouble-understanding-why-a-single-click-in-my-code-is-selecting-text
I'd just add that Chrome doesn't seem affected by this behavior, but Edge is, and Firefox is affected at least in Linux and Windows.
Actual results:
The previous stackoverflow link also mentions results.
Expected results:
The previous stackoverflow link also mentions expectations.
Hi, thanks for reporting this issue. I was able to reproduce with Windows and Linux on 59.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Product: Firefox → Core
Comment 2•8 years ago
|
||
Is this a regression?
After a few more tests I'm more confused.
I went to jsfiddle once again, and this time I setup mouseup events for all the objects in the page, and they work as expected. The explanation for this behavior was that maybe the mouse down and up events ended up in different objects, but they don't. They even seem to click on the same place, as expected, clientX-Y and layerX-Y match.
One other thing I tried was using the 'Responsive Design Mode' and enabling touch simulation, there I noticed that when I click on the square, a couple of markers show up, in different places.
https://jsfiddle.net/16k672tt/64/
Actually the last jsfiddle included the preventDefault() calls that serve as a workaround for the text selection unexpected behavior, need to comment those out to show it again.
https://jsfiddle.net/16k672tt/66/
Updated•8 years ago
|
Summary: The mouse up event is handled after the click event → Add a small delay for mouseup of context menu-opening mousedown selecting a menu item
Comment 5•8 years ago
|
||
Sorry. Changed the summary of wrong bug.
Summary: Add a small delay for mouseup of context menu-opening mousedown selecting a menu item → The mouse up event is handled after the click event
Comment 6•8 years ago
|
||
The spec language on this point seems to be in the MAY territory. https://w3c.github.io/uievents/#event-type-click
Leaving this open in case we need to match Chrome for compat despite the spec being permissive.
Should we get the spec to be more specific?
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•