Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify note about keyboard-activated click events #36256

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/click_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ An element receives a **`click`** event when any of the following occurs:
- 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"`. To check the reason behind this behavior, see this [Chromium issue](https://crbug.com/40776466).
> 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).

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