aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Docs: Use https for hyperlinks in READMEJonathan2020-04-171-4/+4
| | | | | | Closes gh-4673 (cherry picked from commit 73415da25d964ee31ec1804d55f5af0199a1378e)
* Build: Updating the 3.x-stable version to 3.5.1-pre.Michał Gołębiowski-Owczarek2020-04-101-1/+1
|
* Release: Update AUTHORS.txtMichał Gołębiowski-Owczarek2020-04-101-0/+2
|
* Ajax: Do not execute scripts for unsuccessful HTTP responsesSean Robinson2020-04-064-0/+145
| | | | | | | | | | | | 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
* Ajax: Overwrite s.contentType with content-type header value, if anyChristian Wenz2020-04-062-0/+55
| | | | | | | | | | | | | | 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>
* Tests: Blacklist one focusin test in IEMichał Gołębiowski-Owczarek2020-04-061-1/+8
| | | | | | | 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.
* Event: Use only one focusin/out handler per matching window & documentMichał Gołębiowski-Owczarek2020-04-062-10/+48
| | | | | | | | | | | | | | | 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
* Manipulation: Skip the select wrapper for <option> outside of IE 9Michał Gołębiowski-Owczarek2020-03-303-7/+27
| | | Closes gh-4647
* Manipulation: Make jQuery.htmlPrefilter an identity functionMichał Gołębiowski-Owczarek2020-03-1618-257/+246
| | | | | | Closes gh-4642 (cherry picked from 90fed4b453a5becdb7f173d9e3c1492390a1441f)
* Selector: Update Sizzle from 2.3.4 to 2.3.5Michał Gołębiowski-Owczarek2020-03-164-324/+520
| | | | | | | Fixes gh-4424 Fixes gh-4435 Fixes gh-4441 Fixes gh-4453 Closes gh-4641
* Build: Resolve Travis config warningsMichał Gołębiowski-Owczarek2020-03-131-2/+2
| | | | | | | | | | | | | Travis reports warnings in our config: * root: deprecated key sudo (The key `sudo` has no effect anymore.) * root: missing os, using the default linux * root: key matrix is an alias for jobs, using jobs They are all now resolved. Closes gh-4636 (cherry picked from commit 5b94a4f847fe2328b1b8f2340b11b6031f95d2d1)
* Data:Event:Manipulation: Prevent collisions with Object.prototypeMichał Gołębiowski-Owczarek2020-03-026-9/+69
| | | | | | | | | | 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)
* Release: Use an in-repository dist README fixtureMichał Gołębiowski-Owczarek2020-03-023-65/+134
| | | | | | | | | | | | | Use a dist README fixture kept in the jQuery repository instead of modifying an existing one. This makes the jQuery repository the single source of truth when it comes to jQuery releases and it makes it easier to make changes to README without worrying how it will affect older jQuery lines. The commit also ES6ifies build/release.js & build/release/dist.js Closes gh-4614 (cherry picked from commit 358b769a00c3a09a8ec621b8dcb2d5e31b7da69a)
* Build: Enable ESLint one-var rule for var declarations in browser codeMichał Gołębiowski-Owczarek2020-03-025-5/+9
| | | | | | | | | | 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)
* Tests: Pass a number of necessary done() calls to assert.async()Michał Gołębiowski-Owczarek2020-03-022-10/+10
| | | | | | | | | It is no longer needed to create `done` wrappers in tests that require multiple async operations to complete. Closes gh-4633 (cherry picked from commit 364476c3dc1231603ba61fc08068fa89fb095e1a)
* Build: Test the no-Sizzle build on TravisMichał Gołębiowski-Owczarek2020-03-022-1/+9
| | | Closes gh-4635
* Build: Update .mailmap & AUTHORS.txtMichał Gołębiowski-Owczarek2020-02-242-0/+14
| | | | | | | Partially based on gh-4613. Ref gh-4613 Ref 721744a9fab5b597febea64e466272eabfdb9463
* Core:Ajax: Align nonce & global with master, fix an AMD issueMichał Gołębiowski-Owczarek2020-02-244-5/+6
| | | | | | | | | | | | | | | | 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
* Core: Fire iframe script in its context, add doc param in globalEvalMichał Gołębiowski-Owczarek2020-02-108-10/+74
| | | | | | | | | | | | | 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)
* Build:Tests: Fix custom build tests, verify on Travis; name Travis jobsMichał Gołębiowski-Owczarek2020-01-2728-180/+284
| | | | | | | | | | | | | | | | 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
* Ajax: Deprecate AJAX event aliases, inline event/alias into deprecatedMichał Gołębiowski-Owczarek2020-01-217-58/+56
| | | | | | | | | | | 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)
* Build: Lint the minified jQuery file as wellMichał Gołębiowski-Owczarek2020-01-214-19/+30
| | | | | | | | | | | | While we have absolutely no style-related expectations to our minified file, we do care that it's valid ES 5.1. This is now verified. Also, update grunt-eslint as a newer ESLint version is required to be able to use "extends" inside of the "overrides" section. Fixes gh-3075 Closes gh-4594 Ref gh-4598
* Build: Make Karma work in AMD modeMichał Gołębiowski-Owczarek2020-01-219-125/+183
| | | | | | | | | | | Also, run such a suite in CI to make sure modules are working as expected when used directly. (partially cherry picked from 341c6d1b5abe4829f59fbc32e93f6a6a1afb900f) (partially cherry picked from 437f389a24a6bef213d4df507909e7e69062300b) Closes gh-4595 Ref gh-4550 Ref gh-4574
* Docs: Update links to EdgeHTML issues to go through Web ArchiveMichał Gołębiowski-Owczarek2020-01-081-22/+22
| | | | | | | | | | | | With Microsoft going Chromium with Edge, its old EdgeHTML issues were all removed. :( The commit also reformats one manipulation unit test to use tabs instead of spaces for indentation. (partially cherry-picked from 1dad1185e0b2ca2a13bf411558eda75fb2d4da88) Closes gh-4584
* Tests: Make the support tests pass on Firefox 4x/5x/60Michał Gołębiowski-Owczarek2020-01-071-1/+1
| | | | | | | The check for old Firefox versions with different support test result only checked for Firefox 52 or 60. It now checks for 4x/5x/60 to understand more versions. Closes gh-4583
* Build: Create a `grunt custom:slim` alias for the Slim buildMichał Gołębiowski-Owczarek2020-01-073-2/+25
| | | | | | Closes gh-4578 (cherry-picked from 9b9ed469b43e9fa6e2c752444470ae4c87d03d57)
* Event: Only attach events to objects that accept data - for realMichał Gołębiowski-Owczarek2019-12-092-3/+13
| | | | | | | | | | | | | 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
* Tests: Skip a "width/height on a table row with phantom borders" test in FirefoxMichał Gołębiowski-Owczarek2019-10-281-1/+8
| | | | | | | | | Firefox 70 & newer fail this test but the issue there is more profound - Firefox doesn't subtract borders from table row computed widths. Closes gh-4537 Ref jquery/jquery#4529 Ref https://bugzilla.mozilla.org/show_bug.cgi?id=1590837 Ref w3c/csswg-drafts#4444
* Tests: Don't test synchronous XHR on unload in ChromeMichał Gołębiowski-Owczarek2019-10-281-8/+13
| | | | | | | Chrome 78 dropped support for synchronous XHR requests inside of beforeunload, unload, pagehide, and visibilitychange event handlers. See https://bugs.chromium.org/p/chromium/issues/detail?id=952452 Closes gh-4536
* Build: Run tests on Travis only on browsers defined in the configMichał Gołębiowski-Owczarek2019-10-221-2/+4
| | | | | | | | | The environmental variable BROWSERS was being created but it wasn't read in the list of browsers to pass to Karma. Closes gh-4532 (cherry picked from commit bcbcdd2b2c1bb7075f4f73dc89ca7d65db2a09ed)
* Build: Run tests on Firefox ESR as wellMichał Gołębiowski-Owczarek2019-10-221-0/+7
| | | Closes gh-4530
* Build: Run tests on Node.js 13 in addition to 8, 10 & 12Michał Gołębiowski-Owczarek2019-10-221-0/+1
| | | | | | Closes gh-4528 (cherry picked from commit 830976e690b5fffeac860e2fdd07986d087ce824)
* Build: Drop workarounds for Node.js 6 in Gruntfile.jsMichał Gołębiowski-Owczarek2019-10-221-20/+2
|
* Build: Run tests on Travis on FirefoxHeadless as wellMichał Gołębiowski-Owczarek2019-10-222-8/+8
| | | | | | | | | | | Also, run them on both ChromeHeadless & FirefoxHeadless locally on `grunt karma:main`. Plus, so far, the chrome addons were installed for all the jobs, even the ones that weren't used for browser testing. Changing that makes those jobs faster. (cherry-picked from 84835e68239ce55d1fc007b284e8ef4ed2817c2)
* Offset: Send px-ed strings to .css()Dave Methvin2019-10-211-0/+6
| | | | | 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
* CSS: Workaround buggy getComputedStyle on table rows in IE/EdgeMichał Gołębiowski-Owczarek2019-10-144-10/+82
| | | | Fixes gh-4490 Closes gh-4503
* Build: Require strict mode in Node.js scripts via ESLintMichał Gołębiowski-Owczarek2019-10-0912-14/+26
| | | | | | | | | | | So far, only browser-based JS files were required to be in strict mode (in the function form). This commit adds such a requirement to Node.js scripts where the global form is preferred. All Node.js scripts in sloppy mode were converted to strict mode. Closes gh-4499 (cherry picked from commit bbad821c399da92995a11b88d6684970479d4a9b)
* Docs: Convert link to Homebrew from HTTP to HTTPSChristian Oliff2019-10-071-1/+1
| | | | | | | | `http://brew.sh/` -> `https://brew.sh/` Closes gh-4501 (cherry picked from commit e0022f23144fd1dc6db86a5d8c18af47bc14f0f3)
* Build: Support jquery-release --dry-run flagMichał Gołębiowski-Owczarek2019-10-051-1/+2
| | | | | | | | | | Without this change passing `--dry-run` to jquery-release still pushes to the jquery-dist repository which is dangerous as one can assume `--dry-run` to be safe from external side effects. Close gh-4498 (cherry picked from commit d7d0b52bda74486f2351baa9d03ca4534de0d733)
* Build: Stop copying src/core.js to dist on releaseMichał Gołębiowski-Owczarek2019-10-041-4/+7
| | | | | | | | | | | File `src/core.js` has started erroneously being copied to `dist/` in gh-2981. Fixes gh-4489 Closes gh-4492 Ref gh-2979 Ref gh-2981 (cherry picked from commit 9a4d980639dd804ad320685a25b8ff4572e3f595)
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-09-2617-26/+25
| | | | | | | | | | | | | | | | 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)
* Build: Fix the regex parsing AMD var-modules (#4389)Michał Gołębiowski-Owczarek2019-09-261-1/+1
| | | | | | | | | | | | | | | | | | | The previous regex caused the final jQuery binary to have syntax errors for var-modules with names starting with "return". For example, the following module wouldn't work when the file is named `returnTrue.js`: ```js define( function() { "use strict"; return function returnTrue() { return true; }; } ); ``` Closes gh-4389 (cherry picked from commit 9ec09c3b4aa5182c2a8b8f51afb861b685a4003c)
* Effect: Fix a unnecessary conditional statement in .stop()Wonseop Kim2019-09-261-1/+1
| | | | | | | | | | | | 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)
* Core: Deprecate jQuery.trimShashanka Nataraj2019-09-265-36/+33
| | | | | | | Fixes gh-4363 Closes gh-4461 (cherry picked from 5ea5946094784f68437ef26d463dfcfbbbaff1f6)
* Core: Use Array.prototype.flat where supportedAhmed.S.ElAfifi2019-09-255-15/+41
| | | | | | | | | | | | | 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
* Build: Update the version to 3.5.0-preMichał Gołębiowski-Owczarek2019-09-251-1/+1
|
* Core: Implement .even() & .odd() to replace POS :even & :oddMichał Gołębiowski-Owczarek2019-09-242-0/+24
| | | | | | | | | `: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)
* Tests: Fix offset fractions tests in Chrome for AndroidMichał Gołębiowski-Owczarek2019-09-241-1/+1
| | | | | | This commit backports a looser assertion from `master` where the browsers passes offset tests. Closes gh-4470
* Tests: Move Android user agent detection above iOS, put Safari lastMichał Gołębiowski-Owczarek2019-09-241-4/+4
| | | | | | Android was catching the generic iOS regex. Checking for Android first should eliminate that issue as iOS user agents don't contain the word "Android". Putting Safari last makes Android UAs not be tested against it.
* Tests: Make support tests accept Safari 13 & newerMichał Gołębiowski-Owczarek2019-09-231-5/+5
| | | | | | | | The regexes detecting browsers with their versions have been updated for iOS and Safari so that all iOS >=11 & all Safari (desktop) >= 11 are recognized. This is required to make Safari 13 & iOS 13 pass support tests but it'll also make tests forward-compatible with future Safari/iOS versions. Closes gh-4488