- Notifications
You must be signed in to change notification settings - Fork20.6k
Commite539bac
authored
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.on(focus).off(focus)
1 parenta702746 commite539bac
2 files changed
+20
-4
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
746 | 746 |
| |
747 | 747 |
| |
748 | 748 |
| |
749 |
| - | |
750 |
| - | |
751 |
| - | |
752 |
| - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
753 | 753 |
| |
754 | 754 |
| |
755 | 755 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3325 | 3325 |
| |
3326 | 3326 |
| |
3327 | 3327 |
| |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
3328 | 3344 |
| |
3329 | 3345 |
| |
3330 | 3346 |
| |
|
0 commit comments
Comments
(0)