Open Bug 1907830 Opened 1 year ago Updated 1 year ago

Click event fired on <a> without pointerdown

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 128
defect

Tracking

()

People

(Reporter: carlos-mozilla, Unassigned)

References

Details

Given the following scenario:

  • A button which toggles the visibility of a menu
  • Menu contains a link <a> which gets displayed on top of the button

When using touch as pointer, and the user touches the button, the following happens:

  1. pointerdown fires on button
  2. handler makes menu visible
  3. <a> does NOT receive pointerdown or pointerup
  4. <a> receives click event and gets activated

Having the <a> be activated without this element having received a pointerdown event seems unexpected and a bug. As for browser compat, Chromium and Safari do not fire the click event.

See: https://codepen.io/jeurissen/pen/OJeVGgo

Severity: -- → S3

Sounds like this is a bug which I'm trying to fix in bug 1885232.

Depends on: 1885232
You need to log in before you can comment on or make changes to this bug.