Skip to content

Commit

Permalink
Followup to PR 36256
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg committed Oct 8, 2024
1 parent b2833dd commit de6e638
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions files/en-us/web/api/element/click_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ An element receives a **`click`** event when any of the following occurs:

- A pointing-device button (such as a mouse's primary button) is both pressed and released while the pointer is located inside the element.
- A touch gesture is performed on the element.
- Any user interaction that is equivalent to a click occurs, such as pressing the <kbd>Space</kbd> key or <kbd>Enter</kbd> key while the element is focused.

> [!NOTE]
> In practice, browsers don't fire the `click` event for custom controls (such as a `<div>` with `tabindex="0"`) when activated by keyboard. To check the reason behind this behavior, see this [Chromium issue](https://crbug.com/40776466).
- Any user interaction that is equivalent to a click occurs, such as pressing the <kbd>Space</kbd> key or <kbd>Enter</kbd> key while the element is focused. Note that this only applies for elements with a default key event handler, and therefore excludes other elements that have been made focusable by setting the [`tabindex`](/en-US/docs/Web/HTML/Global_attributes/tabindex) attribute.

If the button is pressed on one element and the pointer is moved outside the element before the button is released, the event is fired on the most specific ancestor element that contained both elements.

Expand Down

0 comments on commit de6e638

Please sign in to comment.