Commit 9e15d6b
authored
Event: Use only one focusin/out handler per matching window & document
The `doc` variable in:
https://github.com/jquery/jquery/blob/3.4.1/src/event/focusin.js#L30
matched `document` for `document` & `window` for `window`, creating two
separate wrapper event handlers & calling handlers twice if at least one
`focusout` or `focusin` handler was attached on *both* `window` & `document`,
or on `window` & another regular node.
Also, fix the "focusin from an iframe" test to actually verify the behavior
from commit 1cecf64 - the commit that
introduced the regression - to make sure we don't regress on either front.
Fixes jquerygh-4652
Closes jquerygh-46561 parent 966a709 commit 9e15d6b
2 files changed
+48
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2555 | 2555 | | |
2556 | 2556 | | |
2557 | 2557 | | |
2558 | | - | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
2559 | 2561 | | |
2560 | 2562 | | |
2561 | 2563 | | |
2562 | 2564 | | |
2563 | 2565 | | |
2564 | 2566 | | |
2565 | 2567 | | |
| 2568 | + | |
2566 | 2569 | | |
2567 | 2570 | | |
2568 | 2571 | | |
2569 | 2572 | | |
2570 | | - | |
2571 | | - | |
2572 | | - | |
2573 | | - | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
| 2573 | + | |
2577 | 2574 | | |
2578 | 2575 | | |
2579 | 2576 | | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
2580 | 2587 | | |
2581 | 2588 | | |
2582 | 2589 | | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2583 | 2618 | | |
2584 | 2619 | | |
2585 | 2620 | | |
| |||
0 commit comments