| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
- Fixes an issue with the support test in iframes in Android 8 Chrome 86+,
where display: inline resulted in unexpected height values.
Fixes gh-4832
|
|
|
|
|
|
| |
Closes gh-4828
(cherry picked from a32cf6324f8f2190e66a687e94be9687ebf840b7)
|
|
|
|
|
|
|
|
|
| |
Firefox incorrectly (or perhaps correctly) includes table borders in computed
dimensions, but they are the only one. Workaround this by testing for it and
falling back to offset properties
Fixes gh-4529
Closes gh-4807
|
|
|
|
|
|
|
| |
Fixes gh-4784
Closes gh-4816
(cherry picked from commit 8969732518470a7f8e654d5bc5be0b0076cb0b87)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue gh-4379 was meant to be a bug fix but the JSONP case is a bit special:
under the hood it's a script but it simulates JSON responses in an environment
without a CORS setup and sending JSON payloads on error responses is quite
typical there.
This commit makes JSONP error responses still execute the payload. The regular
script error responses continue to be skipped.
Fixes gh-4771
Closes gh-4773
(cherry picked from commit a1e619b03a557b47c3e26a5e74af12b63a0d5e73)
|
|
|
|
|
|
|
| |
Allow jQuery to recognize that DOM types such as HTMLCollection
or NodeList are not functions.
Fixes gh-4756
Closes gh-4757
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way warning against number values in `.css()` setters was done in
jquery/jquery-migrate#337 and later refined in jquery/jquery-migrate#348
there's no need to send px-ed strings for `top` & `left` as they already
don't get the "px" suffix.
This reverts commit 57038faebc6ece5bd666c28303f8a91ff59153eb.
Closes gh-4753
Ref jquery/jquery-migrate/pull/337
Ref jquery/jquery-migrate/pull/348
|
|
|
|
|
|
|
|
| |
Closes gh-4696
Ref jquery/eslint-config-jquery#15
Ref jquery/eslint-config-jquery#16
(cherry picked from commit ef4d6ca6c3a1b276fedc27b1f3a18823276f01a3)
|
|
|
|
|
|
| |
Closes gh-4711
(cherry picked from 11611967adf2bd9ff4304132f917629ec1134049)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change in gh-4603 made the object returned by `elem.data()`
a prototype-less object. That's a desired change to support keys
colliding with `Object.prototype` properties but it's also a breaking
change so it has to wait for jQuery 4.0.0.
A 3.x-only test was added to avoid breaking it in the future on this
branch.
Fixes gh-4665
Ref gh-4603
Closes gh-4666
|
|
|
|
|
|
|
|
|
|
|
|
| |
The script transport used to evaluate fetched script sources which is
undesirable for unsuccessful HTTP responses. This is different to other data
types where such a convention was fine (e.g. in case of JSON).
(cherry picked from 50871a5a85cc802421b40cc67e2830601968affe)
Fixes gh-4250
Fixes gh-4655
Closes gh-4379
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the issue of "%20" in POST data being replaced with "+"
even for requests with content-type different from
"application/x-www-form-urlencoded", e.g. for "application/json".
Fixes gh-4119
Closes gh-4650
(cherry picked from 7fb90a6beaeffe16699800f73746748f6a5cc2de)
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 1cecf64e5aa415367a7dae0b55c2dd17b591442d - the commit that
introduced the regression - to make sure we don't regress on either front.
Fixes gh-4652
Closes gh-4656
|
|
|
| |
Closes gh-4647
|
|
|
|
|
|
| |
Closes gh-4642
(cherry picked from 90fed4b453a5becdb7f173d9e3c1492390a1441f)
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit aligns the `3.x-stable` branch with `master` in two aspects:
1. It migrates the nonce module to return an object instead of a primitive
variable. This had to be changed on `master` as in ES modules you export
live read-only bindings to variables, meaning you can't increment the nonce
directly. Also, the way it was done so far was working differently in AMD & the
single built file - in the built file one nonce variable was declared, accessed
and incremented. In AMD mode separate instances were create for each module
that depend on the nonce module, creating unintended nonce clashes.
2. Whether the `noGlobal` parameter was set to `true` is now checked using the
typeof operator to align with `master`.
Closes gh-4612
Ref gh-4541
Ref d0ce00cdfa680f1f0c38460bc51ea14079ae8b07
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Support passing custom document to jQuery.globalEval; the script will be
invoked in the context of this document.
2. Fire external scripts appended to iframe contents in that iframe context;
this was already supported & tested for inline scripts but not for external
ones.
Fixes gh-4518
Closes gh-4601
(cherry picked from commit 4592595b478be979141ce35c693dbc6b65647173)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes unit tests for the following builds:
1. The no-deprecated build: `custom:-deprecated`
2. The current slim build: `custom:-ajax,-effects`
3. The 4.0 (#4553) slim build: `custom:-ajax,-callbacks,-deferred,-effects`
It also adds separate Travis jobs for the no-deprecated & slim builds.
Apart from that, add intuitive names to Travis jobs. Otherwise it's hard to see
at a glance that a particular job is running on Firefox ESR, for example.
Ref gh-4577
Ref gh-4596
Closes gh-4600
|
|
|
|
|
|
|
|
|
|
|
| |
A new `src/deprecated` directory makes it possible to exclude some deprecated
APIs from a custom build when their respective "parent" module is excluded
without keeping that module outside of the `src/deprecated` directory or
the `src/deprecated.js` file.
Closes gh-4572
(cherry picked from 23d53928f383b0e7440bf4b08b7524e6af232fad)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
An upcoming release of Migrate will generate warnings for calls to .css() that pass numbers rather than strings, see jquery/jquery-migrate#296 . At the moment, core's .offset() setter passes numbers rather than px strings so it would throw warnings. This commit fixes that.
Closes gh-4508
|
|
|
|
| |
Fixes gh-4490
Closes gh-4503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit requires all function parameters to be used, not just the last one.
In cases where that's not possible as we need to match an external API, there's
an escape hatch of prefixing an unused argument with `_`.
This change makes it easier to catch unused AMD dependencies and unused
parameters in internal functions the API of which we may change at will, among
other things.
Unused AMD dependencies have been removed as part of this commit.
Closes gh-4381
(cherry-picked from 438b1a3e8a52d3e4efd8aba45498477038849c97)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of the above conditional, the 'type' variable has a value of type
'string' or undefined. Therefore, boolean comparisons for 'type' variable
is always unnecessary because it return true. The patch removed the
unnecessary conditional statement.
Fixes gh-4374
Closes gh-4375
(cherry picked from commit 110802c7f22b677ef658963aa95ebdf5cb9c5573)
|
|
|
|
|
|
|
| |
Fixes gh-4363
Closes gh-4461
(cherry picked from 5ea5946094784f68437ef26d463dfcfbbbaff1f6)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling `Array.prototype.concat.apply( [], inputArray )` to flatten `inputArray`
crashes for large arrays; using `Array.prototype.flat` avoids these issues in
browsers that support it. In case it's necessary to support these large arrays
even in older browsers, a polyfill for `Array.prototype.flat` can be loaded.
This is already being done by many applications.
(cherry picked from 9df4f1de12728b44a4b0f91748f12421008d9079)
Fixes gh-4320
Closes gh-4459
|
|
|
|
|
|
|
|
|
| |
`:even` & `:odd` are deprecated since jQuery 3.4.0 & will be removed in 4.0.0.
The new `even()` & `odd()` methods will make the migration easier.
Closes gh-4485
(cherry picked from commit 78420d427cf3734d9264405fcbe08b76be182a95)
|
|
|
|
|
|
|
|
|
|
| |
This commit also backports some jQuery.isXMLDoc tests from master so that this
behavior doesn't regress.
(partially cherry-picked from 79b74e043a4ee737d44a95094ff1184e40bd5b16)
Closes gh-4438
Ref jquery/sizzle#378
Ref jquery/sizzle#436
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original fix didn't account for the fact that in IE `<object>` elements
with no `data` attribute have an object `contentDocument`. The fix leverages
the fact that this special object has a null prototype.
(cherry-picked from ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3)
Closes gh-4390
Ref gh-4384
Ref gh-4385
|
|
|
|
|
|
|
| |
(cherry-picked from 4d865d96aa5aae91823c50020b5c19da79566811)
Fixes gh-4384
Closes gh-4385
|
|
|
|
|
|
|
|
|
|
|
| |
The test for Shadow DOM v1 support has been changed to rely on the presence of
`documentElement.getRootNode` as iOS 10.0-10.2 supports `attachShadow` but
doesn't support `getRootNode`.
No new test is necessary - iOS 10.0 fails lots of our test suite because of
this bug.
Fixes gh-4356
Closes gh-4360
|
|
|
| |
Closes gh-4353
|
|
|
|
| |
Fixes gh-4350
Closes gh-4354
|
|
|
|
|
|
|
|
|
|
| |
Also, prevent further similar breakages by changing our ESLint configuration
to disallow relying on a global jQuery object in AMD modules.
(cherry-picked from 874030583c9b94603de467124420e6c7a1c3c8ac)
Fixes gh-4358
Closes gh-4361
|
|
|
|
|
| |
Fixes gh-4323
Closes gh-4328
|
|
|
|
|
|
| |
Also, reduce size.
Closes gh-4329
Ref gh-4279
|
|
|
| |
Closes gh-4333
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-4322
Closes gh-4325
Ref gh-3991
Ref gh-4010
Ref gh-4185
Ref gh-4187
|
|
|
|
|
| |
We had quite a few obsolete globals declared in various ESLint config files. We also no longer allow to rely on the `noGlobal` & `jQuery` globals in the built file which is not needed.
Closes gh-4301
|
|
|
|
|
|
| |
Fixes gh-4278
Closes gh-4280
Ref gh-3541
Ref gh-4269
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR #3869 added support for `<script type="module">` & some support for
the `nomodule` attribute but with no tests for `nomodule` and with the
attribute only respected on inline scripts. This commit adds support for
source-based scripts as well. It also adds tests for `nomodule`, including
making sure legacy browsers execute such scripts as they'd natively do - that's
the whole point of `nomodule` scripts, after all.
Fixes gh-4281
Closes gh-4282
Ref gh-3871
Ref gh-3869
|
|
|
|
| |
Fixes gh-3541
Closes gh-4269
|