| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only allow alphanumeric characters & underscores for callback parameters.
The change is done both for the PHP server as well as the Node.js-based version.
This is only test code so we're not fixing any security issue but it happens
often enough that the whole jQuery repository directory structure is deployed
onto the server with PHP enabled that it makes is easy to introduce security
issues if this cleanup is not done.
Ref gh-4764
Closes gh-4871
(cherry picked from a70274632dc19ff4a64d7bb7657a2cc647ff38b9)
|
| |
|
| |
|
| |
|
|
|
|
| |
- Not meant to be used like that anymore
|
| |
|
| |
|
|
|
|
| |
Fixes gh-4782
Close gh-4846
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
The default branch was updated, this updates the remaining occurrences in code
& comments.
Closes gh-4838
(cherry picked from commit 8ae477a432f0924cd4bd3bdeaef2c4c15e483a8f)
|
|
|
|
|
|
| |
Closes gh-4828
(cherry picked from a32cf6324f8f2190e66a687e94be9687ebf840b7)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two issues are fixed in testing for responses with a script Content-Type not
getting auto-executed unless an explicit `dataType: "script"` is provided:
* the test is now using a correct "text/javascript" Content-Type; it was using
"text/html" until now which doesn't really check if the fix works
* the Node.js based version of the tests didn't account for an empty `header`
query string parameter
Closes gh-4824
Ref gh-2432
Ref gh-2588
Ref 39cdb8c9aa0fde68f733553ba050a2ba9d86474c
(cherry picked from commit d38528b17a846b7ca4513b41150a05436546292d)
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Legacy Edge, similarly to IE, doesn't report XML parsing errors but just tries
to render the invalid document. Skip the error reporting test there, Edge Legacy
will return a generic "Invalid XML" error, just like IE.
Ref gh-4816
|
|
|
|
|
|
|
|
| |
Changes:
* Remove incorrect `QUnit.testUnlessIE` usage as that util is only available
on `master`, not here.
* Change `firstCall.lastArg` to `firstCall.args[ 0 ]` as the former API is not
available in older Sinon versions.
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
The `grunt-karma` version we used required Karma 3.x and it's now enforced
in npm 7. Update a few Karma & Grunt-related packages to resolve the issue.
Closes gh-4810
|
|
|
|
|
|
|
|
| |
Also, run browser tests on Node 14 instead of 12.
Closes gh-4802
(cherry-picked from 6984d1747623dbc5e87fd6c261a5b6b1628c107c)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This aligns the Node.js server with the previous PHP one in sending `mock.php`
as a callback if there's no `callback` parameter in the query string which is
triggered by a recently added test. This prevents the request crashing on that
Node.js server and printing a JS error:
```
TypeError: Cannot read property '1' of null
```
Closes gh-4764
Ref gh-4754
(cherry picked from commit df6858df2ed3fc5c424591a5e09b900eb4ce0417)
|
|
|
|
|
|
|
|
|
|
|
| |
The test has been already skipped in Chrome as it dropped support for such
requests and now Safari has joined the squad.
This will resolve AJAX test errors we've had for a while in Safari 13 & iOS 13.
Closes gh-4779
(cherry picked from commit c18dc49699bc27481a4af36ed1a0ee1b19c6eb03)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
Closes gh-4769
(cherry picked from commit 82b87f6f0e45ca4e717b4e3a4a20a592709a099f)
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Fixes gh-4735
Closes gh-4737
(cherry picked from commit 3a1b338a7a579a45543b031a003abdce4dc6ac67)
|
|
|
|
|
|
|
|
| |
Closes gh-4696
Ref jquery/eslint-config-jquery#15
Ref jquery/eslint-config-jquery#16
(cherry picked from commit ef4d6ca6c3a1b276fedc27b1f3a18823276f01a3)
|
|
|
|
|
|
|
|
|
| |
PR gh-4586 removed some of those but not all.
Closes gh-4715
Ref gh-4586
(cherry picked from commit d96111e18b42ae1bc7def72a8a0d156ea39e4d0e)
|
|
|
|
|
|
|
|
| |
The tests relied on `jQuery.cache` so they only ever worked in jQuery 1.x.
Closes gh-4586
(cherry picked from commit eb35be528fdea40faab4d89ac859d38dfd024271)
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
iOS 8-12 parses `<noembed>` tags differently, executing this code. This is no
different to native behavior on that OS, though, so just accept it.
Ref gh-4685
Closes gh-4694
(cherry picked from commit 11066a9e6ac183dd710d1bc7aa74a3f809757136)
|
|
|
|
|
|
| |
Closes gh-4686
(cherry picked from commit 1a7332ce83cdee7d6cd9d45c2a4b83067f53f14b)
|
|
|
|
|
|
|
|
| |
Closes gh-4685
Ref gh-4642
Ref gh-4647
(cherry picked from commit dc06d68bdc4c2562b5cc530f21e668a17d78ee2d)
|
|
|
|
|
|
|
| |
The "focusin on document & window" test didn't cleanup `focusout` handlers
on `window` & `document`. This has been fixed.
Ref gh-4657
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "jQuery.ajax() - JSONP - Same Domain" test is firing a request with
a duplicate "callback" parameter, something like (simplified):
```
mock.php?action=jsonp&callback=jQuery_1&callback=jQuery_2
```
There was a difference in how the PHP & Node.js implementations of the jsonp
action in the mock server handled situations like that. The PHP implementation
was using the latest parameter while the Node.js one was turning it into an
array but the code didn't handle this situation. Because of how JavaScript
stringifies arrays, while the PHP implementation injected the following code:
```js
jQuery_2(payload)
```
the Node.js one was injecting the following one:
```js
jQuery_1,jQuery_2(payload)
```
This is a comma expression in JavaScript; it so turned out that in the majority
of cases both callbacks were identical so it was more like:
```js
jQuery_1,jQuery_1(payload)
```
which evaluates to `jQuery_1(payload)` when `jQuery_1` is defined, making the
test go as expected. In many cases, though, especially on Travis, the callbacks
were different, triggering an `Uncaught ReferenceError` error & requiring
frequent manual re-runs of Travis builds.
This commit fixes the logic in the mock Node.js server, adding special handling
for arrays.
Closes gh-4687
(cherry picked from commit 7b0864d0539bbfbb01d88d9bc95369580ffd99bc)
|
|
|
|
|
|
| |
Closes gh-4684
(cherry picked from commit a62309e01b3c76d2b73560ca666c454b7bbfcb77)
|
|
|
|
|
|
| |
Closes gh-4678
(cherry picked from commit 88eb22e0599d546f98f6145c53deb086e1d82857)
|
|
|
|
|
|
|
|
|
| |
This forbids unnecessary `eslint-disable` comments.
Ref gh-4095
Closes gh-4520
(cherry picked from 46f9810b73a7ad446d7c3711faf92f56b67df3c1)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Closes gh-4673
(cherry picked from commit 73415da25d964ee31ec1804d55f5af0199a1378e)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 main part of the test was checking that focusin handling in an iframe works
and that's still checked. The test was also checking that it doesn't propagate
to the parent document, though, and, apparently, in IE it does. This one test
is now blacklisted in IE.
|