- Notifications
You must be signed in to change notification settings - Fork20.6k
Commitb3e4a7e
committed
Event: Don't break focus triggering after
The `_default` function in the special event settings for focus/blur hasalways returned `true` sincegh-4813 as the event was already being firedfrom `leverageNative`. However, that only works if there's an active handleron that element; this made a quick consecutive call:```jselem.on( "focus", function() {} ).off( "focus" );```make subsequent `.trigger( "focus" )` calls to not do any triggering.The solution, already used in a similar `_default` method for the `click` event,is to check for the `dataPriv` entry on the element for the focus event(similarly for blur).Fixesgh-4867Closesgh-4885(cherry picked from commite539bac).on(focus).off(focus)
1 parent752b898 commitb3e4a7e
2 files changed
+20
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
778 | 778 |
| |
779 | 779 |
| |
780 | 780 |
| |
781 |
| - | |
782 |
| - | |
783 |
| - | |
784 |
| - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
785 | 785 |
| |
786 | 786 |
| |
787 | 787 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3297 | 3297 |
| |
3298 | 3298 |
| |
3299 | 3299 |
| |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
3300 | 3316 |
| |
3301 | 3317 |
| |
3302 | 3318 |
| |
|
0 commit comments
Comments
(0)