New issue
Advanced search Search tips

Issue 860316 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 798535
Owner: ----
Closed: Jul 4
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Click triggers (sometimes) click and mouseleave event

Reported by gabri...@theodo.fr, Jul 4

Issue description

Chrome Version       : 67.0.3396.99
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari: PASS
    Firefox: PASS (Linux 60.0.2)
         IE: PASS (11)
     Chrome: PASS (Linux 67.0.3396.99)

What steps will reproduce the problem?
Click on an element (might need only one click, or several...)

What is the expected result?
Click triggers a click event.


What happens instead?
Click triggers a click event and a mouseleave event (the mouseleave event has the screenX and screenY set to 0)


Please provide any additional information below. Attach a screenshot if
possible.

We have a menu that on hovering a tab of that menu, its content is displayed below. However, if a user clicks in this menu, it occasionaly closes the menu.

Apparently, someone already reported it :
https://stackoverflow.com/questions/29628936/chrome-tapping-on-touchpad-fires-mouseleave
https://stackoverflow.com/questions/47649442/click-event-affects-mouseenter-and-mouseleave-on-chrome-is-it-a-bug

To fix it, we had to modify the hover behavior:
- we used eventListeners to change an attribute value, on mouseenter, we set it to true.
- On mouseleave, if the event positions (screenX and screenY) are equal to 0, we do nothing, else we change the attribute's value to false

We couldn't use the CSS hover pseudo class :/

 
Mergedinto: 798535
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment