| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, when `leverageNative` handled async events, there was
a case where an empty placeholder object was set as a result.
Covering both such an object and `false` required a `length` check.
However, this is not necessary since gh-5223 and the check was
already simplified in other places; this one was missed.
Closes gh-5236
Ref gh-5223
(cherry picked from commit dfe212d5a1eed6b4a67d1cbd04ece09bbac33699)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 of
the propagation, the only way to stop it for jQuery was to stop it for
everyone via native `stopPropagation()`. This is not a problem for
`focus`/`blur` which don't bubble, but it does also stop `click` on
checkboxes and radios. We accept this limitation.
Fixes gh-5015
Closes gh-5228
(cherry picked from commit 6ad3651dbfea9e9bb56e608f72b4ef2f97bd4e70)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In IE (all versions), `focus` & `blur` handlers are fired asynchronously
but `focusin` & `focusout` are run synchronously. In other browsers, all
those handlers are fired synchronously. Asynchronous behavior of these
handlers in IE caused issues for IE (gh-4856, gh-4859).
We now simulate `focus` via `focusin` & `blur` via `focusout` in IE to avoid
these issues. This also let us simplify some tests.
This commit also simplifies `leverageNative` - with IE now using `focusin`
to simulate `focus` and `focusout` to simulate `blur`, we don't have to deal
with async events in `leverageNative`. This also fixes broken `focus` triggers
after first triggering it on a hidden element - previously, `leverageNative`
assumed that the native `focus` handler not firing after calling the native
`focus` method meant it would be handled later, asynchronously, which
was not the case (gh-4950).
To preserve relative `focusin`/`focus` & `focusout`/`blur` event order
guaranteed on the 3.x branch, attach a single handler for both events in IE.
A side effect of this is that to reduce size the `event/focusin` module
no longer exists and it's impossible to disable the `focusin` patch
in modern browsers via the jQuery custom build system.
Fixes gh-4856
Fixes gh-4859
Fixes gh-4950
Ref gh-5223
Closes gh-5224
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a version of gh-4993 for the `3.x-stable` branch.
The GitHub UI treats `#NUMBER` as referring to its own issues which is confusing
when in jQuery source it's usually referring to the old deprecated Trac instance
at https://bugs.jquery.com. This change replaces all such Trac references with
`trac-NUMBER`.
A few of the references came with the Sizzle integration and referred to the
Sizzle GitHub bug tracker. Those have been replaced with full links instead.
A new entry describing issue reference conventions has been added to README.
Closes gh-4994
Ref gh-4993
Ref 5d5ea015114092c157311c4948f7cc3d8c8e7f8a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `_default` function in the special event settings for focus/blur has
always returned `true` since gh-4813 as the event was already being fired
from `leverageNative`. However, that only works if there's an active handler
on that element; this made a quick consecutive call:
```js
elem.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).
Fixes gh-4867
Closes gh-4885
(cherry picked from commit e539bac79e666bba95bba86d690b4e609dca2286)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If during a focus handler another focus event is triggered:
```js
elem1.on( "focus", function() {
elem2.trigger( "focus" );
} );
```
due to their synchronous nature everywhere outside of IE the hack added in
gh-4279 to leverage native events causes the native `.focus()` method to be
called last for the initial element, making it steal the focus back. Since
the native method is already being called in `leverageNative`, we can skip that
final call.
This aligns with changes to the `_default` method for the `click` event that
were added when `leverageNative` was introduced there.
A side effect of this change is that now `focusin` will only propagate to the
document for the last focused element. This is a change in behavior but it also
aligns us better with how this works with native methods.
Fixes gh-4382
Closes gh-4813
Ref gh-4279
(cherry picked from commit dbcffb396c2db61ff96edc4162602e850797d61f)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Chrome, if an element having a `focusout` handler is blurred by
clicking outside of it, it invokes the handler synchronously. If
that handler calls `.remove()` on the element, the data is cleared,
leaving private data undefined. We're reading a property from that
data so we need to guard against this.
Fixes gh-4417
Closes gh-4799
(cherry picked from commit 5c2d08704e289dd2745bcb0557b35a9c0e6af4a4)
|
|
|
|
|
|
|
|
|
|
|
| |
All supported browsers implement this property by themselves. The shim was only
needed for IE <9.
Fixes gh-3235
Closes gh-4765
Ref gh-4755
(cherry picked from commit 1a5fff4c169dbaa2df72c656868bcf60ed4413d0)
|
|
|
|
|
|
|
|
|
|
|
| |
1. Correct code indentations based on jQuery Style Guide
(contribute.jquery.org/style-guide/js/#spacing).
2. Add rules to "src/.eslintrc.json" to enable "enforcing consistent
indentation", with minimal changes to the current code.
Closes gh-4672
(cherry picked from 3d62d5704989f17d3a20ae7521d52e9c8c60b4ee)
|
|
|
|
|
|
|
|
|
|
| |
Make sure events & data keys matching Object.prototype properties work.
A separate fix for such events on cloned elements was added as well.
Fixes gh-3256
Closes gh-4603
(cherry picked from commit 9d76c0b163675505d1a901e5fe5249a2c55609bc)
|
|
|
|
|
|
|
|
|
|
| |
Node.js code is written more & more commonly in ES6+ so it doesn't make sense
to enable it there. There are many violations in test code so it's disabled
there as well.
Closes gh-4615
(cherry picked from commit 4a7fc8544e2020c75047456d11979e4e3a517fdf)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a check in jQuery.event.add that was supposed to make it a noop
for objects that don't accept data like text or comment nodes. The problem was
the check was incorrect: it assumed `dataPriv.get( elem )` returns a falsy
value for an `elem` that doesn't accept data but that's not the case - we get
an empty object then. The check was changed to use `acceptData` directly.
(cherry picked from d5c505e35d8c74ce8e9d99731a1a7eab0e0d911c)
Fixes gh-4397
Closes gh-4558
|
|
|
| |
Closes gh-4353
|
|
|
|
| |
Fixes gh-4350
Closes gh-4354
|
|
|
|
|
|
| |
Also, reduce size.
Closes gh-4329
Ref gh-4279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary of the changes/fixes:
1. Trigger checkbox and radio click events identically (cherry-picked from
b442abacbb8464f0165059e8da734e3143d0721f that was reverted before).
2. Manually trigger a native event before checkbox/radio handlers.
3. Add test coverage for triggering namespaced native-backed events.
4. Propagate extra parameters passed when triggering the click event to
the handlers.
5. Intercept and preserve namespaced native-backed events.
6. Leverage native events for focus and blur.
7. Accept that focusin handlers may fire more than once for now.
Fixes gh-1741
Fixes gh-3423
Fixes gh-3751
Fixes gh-4139
Closes gh-4279
Ref gh-1367
Ref gh-3494
|
|
|
|
|
| |
Fixes gh-3978
Closes gh-3998
|
| |
|
|
|
|
| |
Fixes gh-3609
|
|
|
|
|
| |
Fixes gh-2959
Close gh-3884
|
|
|
|
| |
This reverts commit b442abacbb8464f0165059e8da734e3143d0721f.
|
|
|
|
| |
- nodeName was included at the wrong spot in dependency lists
|
|
|
|
|
| |
Fixes gh-3475
Closes gh-3505
|
|
|
|
|
| |
Fixes gh-3423
Closes gh-3494
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Renames and changes rnotwhite to focus on HTML whitespace chars
- Change internal use of jQuery.trim to more accurate strip and collapse
- Adds tests to ensure HTML space characters are retained where valid
- Doesn't add tests where the difference is inconsequential and
existing tests are adequate.
Fixes gh-3003
Fixes gh-3072
Close gh-3316
|
|
|
|
| |
Closes gh-3255
|
| |
|
|
|
|
|
| |
Ref gh-3104
Close gh-3152
|
|
|
|
|
| |
Fixes gh-3139
Closes gh-3140
|
|
|
|
|
|
| |
In Firefox, called `stop(Immediate)Propagation` methods,
in capturing phase prevents receiving focus
Fixes gh-3111
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes gh-3104
Closes gh-3108
See https://github.com/aarongloege/jquery.touchHooks
Other properties are already present thanks to mouse events.
squash! Add targetTouches
|
|
|
|
| |
Ref 7fd36ea145a11d5896de6d064b546b1c57a83f34
|
|
|
|
|
|
|
| |
This ensures that invalid selectors throw right away.
Fixes gh-3071
Closes gh-3097
|
|
|
|
|
|
|
| |
Fixes gh-3092
CLoses gh-3106
IE8 was the last major browser missing these.
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes gh-3103
Fixes gh-1746
Closes gh-2860
- Removes the copy loop in jQuery.event.fix
- Avoids accessing properties such as client/offset/page/screen X/Y
which may cause style recalc or layouts
- Simplifies adding property hooks to event object
|
|
|
|
|
|
|
| |
Closes gh-2834
- Do not assign to function parameters
- Do not pass arguments object to other functions
|
|
|
|
| |
Fixes gh-3073
|
|
|
|
|
| |
The changes follow the spec proposed in:
https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
|
|
|
|
|
|
|
|
|
|
| |
Support comments that were lacking the final IE/Edge version that exhibits
the bug were checked & updated. Links to the Chromium bug tracker were updated.
Code in tests related to unsupported browsers (like Android 2.3 in non-basic
tests) has been removed.
Fixes gh-2868
Closes gh-2949
|
|
|
|
| |
Close gh-2875
|
|
|
|
| |
Fixes gh-2846
|
|
|
|
|
|
|
|
| |
Fixes gh-1864
Closes gh-2692
This also pulls the focusin/out special event into its own module, since that
depends on simulate(). NB: The ajax module triggers events pretty heavily.
|
|
|
|
|
| |
Fixes gh-2343, gh-2410
Close gh-2617
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Changes "baar" to "bar" when used with "foo" in readme
and comments of js files
* mousenter -> mouseenter
Thanks @garysye, @KimTaehee
Closes gh-2613
Closes gh-2601
|
|
|
|
|
|
| |
jQuery.acceptData is an undocumented internal API that shouldn't be exposed.
Fixes gh-2555
|
|
|
|
| |
Fixes gh-2056
|
|
|
|
|
|
| |
Closes gh-2529
Ref trac-13208
(cherry picked from commit fc2ba2e1361126c39f955437ee025cfca3bffa65)
|
|
|
|
|
|
|
|
|
| |
Custom mouseenter/mouseleave implementation was needed because of:
1. Safari 6 not implementing mouseenter/mouseleave at all.
2. Chrome sending mouseenter too often.
The second issue has been fixed in Chrome but exists now in Safari 7
(it's fixed in Safari 8) so we have to keep it for now, unfortunately.
|
|
|
|
|
|
|
|
| |
Support comments that mentioned only Safari < 7 were checked & updated
to account for bugs existing in newer versions as well; Safari 6 support
test results were removed.
Refs gh-2482
|
|
|
|
| |
Refs gh-2301
|