-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: better hittarget testing for clicking (#2217)
While checking for hittarget, we first bubble from a target element up to find the first element without `pointer-events: none` style. This bubbling does not make much sense: we risk desperately clicking "body" element, when we were actually asked to click some deeply-nested "span". Additionally, in many cases the original intent is to click a button. In this case, we should use the enclosing "button" as a hit target directly. Fixes #2175
- Loading branch information
1 parent
b8410bd
commit 545c43d
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters