- Notifications
You must be signed in to change notification settings - Fork20.6k
Commit6ad3651
authored
Event: Make trigger(focus/blur/click) work with native handlers
In `leverageNative`, instead of calling `event.stopImmediatePropagation()`which would abort both native & jQuery handlers, set the wrapper's`isImmediatePropagationStopped` property to a function returning `true`.Since for each element + type pair jQuery attaches only one native handler,there is also only one wrapper jQuery event so this achieves the goal:on the target element jQuery handlers don't fire but native ones do.Unfortunately, this workaround doesn't work for handlers on ancestors- since the native event is re-wrapped by a jQuery one on each level ofthe propagation, the only way to stop it for jQuery was to stop it foreveryone via native `stopPropagation()`. This is not a problem for`focus`/`blur` which don't bubble, but it does also stop `click` oncheckboxes and radios. We accept this limitation.Fixesgh-5015Closesgh-52281 parentce60d31 commit6ad3651
2 files changed
+73
-6
lines changedLines changed: 12 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
545 | 545 |
| |
546 | 546 |
| |
547 | 547 |
| |
548 |
| - | |
549 |
| - | |
| 548 | + | |
| 549 | + | |
550 | 550 |
| |
551 | 551 |
| |
552 | 552 |
| |
| |||
565 | 565 |
| |
566 | 566 |
| |
567 | 567 |
| |
568 |
| - | |
569 |
| - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
570 | 578 |
| |
571 | 579 |
| |
572 | 580 |
| |
|
Lines changed: 61 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3423 | 3423 |
| |
3424 | 3424 |
| |
3425 | 3425 |
| |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
3426 | 3456 |
| |
3427 | 3457 |
| |
3428 | 3458 |
| |
| |||
3431 | 3461 |
| |
3432 | 3462 |
| |
3433 | 3463 |
| |
3434 |
| - | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
3435 | 3468 |
| |
3436 | 3469 |
| |
3437 |
| - | |
| 3470 | + | |
3438 | 3471 |
| |
3439 | 3472 |
| |
3440 | 3473 |
| |
| |||
3461 | 3494 |
| |
3462 | 3495 |
| |
3463 | 3496 |
| |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
3464 | 3523 |
|
0 commit comments
Comments
(0)