aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
Commit message (Collapse)AuthorAgeFilesLines
* Event: Simulate focus/blur in IE via focusin/focusout (3.x version)Michał Gołębiowski-Owczarek2023-03-272-69/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Docs: Replace `#NUMBER` Trac issue references with `trac-NUMBER`Michał Gołębiowski-Owczarek2022-01-121-3/+3
| | | | | | | | | | | | | | | | | 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
* Build: Correct code indentations based on jQuery Style GuideWonseop Kim2020-05-051-3/+1
| | | | | | | | | | | 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)
* Event: Use only one focusin/out handler per matching window & documentMichał Gołębiowski-Owczarek2020-04-061-2/+5
| | | | | | | | | | | | | | | 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
* Data:Event:Manipulation: Prevent collisions with Object.prototypeMichał Gołębiowski-Owczarek2020-03-021-1/+3
| | | | | | | | | | 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)
* Ajax: Deprecate AJAX event aliases, inline event/alias into deprecatedMichał Gołębiowski-Owczarek2020-01-212-51/+0
| | | | | | | | | | | 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: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-09-262-2/+2
| | | | | | | | | | | | | | | | 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)
* Core: deprecate jQuery.isFunctionJason Bedard2018-01-151-2/+3
| | | | Fixes gh-3609
* Core: Deprecate jQuery.isWindowShashanka Nataraj2017-07-101-4/+4
| | | | | Fixes gh-3629 Close gh-3702
* Event: `stopPropagation()` on native event-handlerPierre Spring2017-07-101-4/+17
| | | | | Fixes gh-3693 Close gh-3694
* Events: don't execute native stop(Immediate)Propagation from simulationOleg Gaidarenko2016-05-191-17/+1
| | | | | | In Firefox, called `stop(Immediate)Propagation` methods, in capturing phase prevents receiving focus Fixes gh-3111
* Build: Put all AMD modules in "src/" in strict modeMichał Gołębiowski2016-04-255-0/+10
| | | | Fixes gh-3073
* Docs: Update support comments to follow the new syntaxMichał Gołębiowski2016-03-301-2/+2
| | | | | The changes follow the spec proposed in: https://github.com/jquery/contribute.jquery.org/issues/95#issuecomment-69379197
* Docs:Tests: Remove obsolete code from tests, update support commentsMichał Gołębiowski2016-03-081-3/+3
| | | | | | | | | | 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
* Event: Remove duplicated word text on commentJae Sung Park2015-12-031-1/+1
| | | | Closes #2751
* Event: Separate trigger/simulate into its own moduleDave Methvin2015-11-063-1/+255
| | | | | | | | 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.
* Event: Move .bind() and .delegate() to deprecatedDave Methvin2015-10-121-18/+0
| | | | | Fixes gh-2288 Closes gh-2624
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-073-13/+14
| | | | Fixes gh-2056
* Event: remove deprecated event aliasesOleg Gaidarenko2015-05-191-2/+2
| | | | | | Fixes gh-2286 Closes gh-2287 Ref trac-11733
* Event: provide verbose comment for focus(in | out) & rename support propOleg Gaidarenko2015-05-191-1/+1
| | | | Closes gh-2312
* Build: update grunt-jscs-checker and pass with the new rulesTimmy Willison2014-07-172-3/+13
|
* Ajax: move ajax event aliases to their own fileTimmy Willison2014-06-021-0/+13
| | | | Fixes #15126
* Fix #10814. Make support tests lazy and broken out to components.Michał Gołębiowski2013-09-061-0/+9
|
* AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.Timmy Willison2013-08-151-0/+39
|
* Reorganzing the jQuery source (first phase).John Resig2007-09-082-666/+0
|
* Fixed a bug in event - "native" is a reserved word in Safari 2.John Resig2007-09-071-2/+2
|
* Integration of Mike Alsup's excellent form serialization code. The benefits ↵John Resig2007-09-051-1/+1
| | | | | | | | | | | | | | | | | | are as follows: - New method: .serializeArray() This returns an array of name/value pairs representing the contents of a form, or individual input elements. - Enhancement: .serialize() The results are correct now (as opposed to the mess from before), and allows you to serializes forms directly (rather than just the input elements). - Enhancement: .val() This now returns the correct value when dealing wih selects. Additionally, when dealing with multiple selects, it returns an array of values. Based upon Mike's code: http://malsup.com/jquery/form/comp/form.js and test suite: http://malsup.com/jquery/form/comp/test.html
* Removed all inline documentation. The current version of all documentation ↵John Resig2007-09-041-569/+10
| | | | is stored online, on the wiki: http://docs.jquery.com/
* Added namespaced events to bind, unbind, and trigger. This allows you to ↵John Resig2007-09-032-10/+52
| | | | deal with event handlers of a specific "class" (great for plugins).
* Reverted the change that I made in #1320.John Resig2007-09-021-1/+1
|
* Made it so that you can pass in an event object to the trigger data args and ↵John Resig2007-08-302-8/+33
| | | | it'll override the custom event object (this way you can pass in the event object of a mousemove to a drag event trigger, for example).
* Added a new extra fn arg to trigger (so you don't have to simulate the ↵John Resig2007-08-302-9/+46
| | | | trigger yourself). (Bug #1467) Added a new .triggerHandler() method that allows you to NOT trigger native calls AND returns the response from the handlers. (Bug #873 & #1417)
* Made jQuery's internal trigger method return the value from handle. (Bug #1417)John Resig2007-08-281-0/+5
|
* Made it so that the last return value is always returned from handle() ↵John Resig2007-08-281-2/+6
| | | | (unless one of the return values was false, in which case the return value is false). (Bug #1416)
* Only bind .ready() once per instance of jQuery - and only bind if the ↵John Resig2007-08-221-1/+11
| | | | ready() method is actually called (nothing is bound if window/load is used).
* Fixed the case where global events weren't being triggered on window and ↵John Resig2007-08-221-1/+1
| | | | document.
* Fix for a selector speed regression (calling a simple selector many times ↵John Resig2007-08-211-4/+0
| | | | | | | | | | resulted in a significant speed down). This has been fixed by breaking the RegExps out into the global scope. This required that a closure be implemented around the full jQuery script (which is now the case). Some simple changes were made in addition to the RegExp one, allowing for some greater flexibility on our part - and hopefully better compression. Speed results: http://dev.jquery.com/~john/ticket/1351/ vs. http://dev.jquery.com/~john/ticket/1351/113.html vs. http://dev.jquery.com/~john/ticket/1351/112.html
* Fixed two cases where []. was used instead of Array.prototype. (Bug #1427)John Resig2007-08-201-1/+1
|
* Make jQuery work without warnings in strict mode, in Firefox.John Resig2007-08-201-2/+2
|
* Complete overhaul of the Ajax test suite, it's now passing in all browsers. ↵John Resig2007-08-191-28/+7
| | | | | | | | | | In order to achieve this I had to fix a numbe r of bugs in the suite itself, along with other random bugs that popped up. The following bugs were resolved along the wa y: #1236 (.extend() keeps processing when it hits nulls), #1028 (.extend() now works recursively), #1080 ($.get no longer overwrites the data parameter), #1210 (Creating script and link tags now work), and #1463 (jQuery.global has been re-too led to no longer leak memory and slow things down).
* More missing semicolons.John Resig2007-08-071-2/+2
|
* When we disabled triggering of clicks, we also killed off blur and focus, ↵John Resig2007-07-311-1/+1
| | | | this fixes that (bug #1440).
* trigger DOM0 event handlers when doing a trigger (#1363)Brandon Aaron2007-07-212-4/+15
|
* broken test in IEBrandon Aaron2007-07-201-13/+11
|
* Fix for #1402Brandon Aaron2007-07-201-2/+2
|
* Fix for IE firing document ready too soon (Bug #1320).John Resig2007-07-121-1/+1
|
* Tweaked some of the tests, added in events and fx tests.John Resig2007-07-091-10/+5
|
* Did some minor tidying up.John Resig2007-06-301-6/+5
|
* Fix for #1322Brandon Aaron2007-06-291-3/+3
|
* Fix for #1187, #1278 and #1279Brandon Aaron2007-06-211-3/+4
|