- Notifications
You must be signed in to change notification settings - Fork20.6k
Commitd5c505e
authored
Event: Only attach events to objects that accept data - for real
There was a check in jQuery.event.add that was supposed to make it a noopfor objects that don't accept data like text or comment nodes. The problem wasthe check was incorrect: it assumed `dataPriv.get( elem )` returns a falsyvalue for an `elem` that doesn't accept data but that's not the case - we getan empty object then. The check was changed to use `acceptData` directly.Fixesgh-4397Closesgh-45581 parent5a3e066 commitd5c505e
2 files changed
+12
-2
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
| |||
109 | 110 |
| |
110 | 111 |
| |
111 | 112 |
| |
112 |
| - | |
113 |
| - | |
| 113 | + | |
| 114 | + | |
114 | 115 |
| |
115 | 116 |
| |
116 | 117 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2811 | 2811 |
| |
2812 | 2812 |
| |
2813 | 2813 |
| |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
2814 | 2823 |
| |
2815 | 2824 |
| |
2816 | 2825 |
| |
|
0 commit comments
Comments
(0)