jquery/test/unit
Michał Gołębiowski-Owczarek ce60d31893
Event: Simulate focus/blur in IE via focusin/focusout
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).

Fixes gh-4856
Fixes gh-4859
Fixes gh-4950
Closes gh-5223

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2023-03-27 21:22:38 +02:00
..
ajax.js Ajax: Don't treat array data as binary 2023-03-21 00:36:00 +01:00
animation.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
attributes.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
basic.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
callbacks.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
core.js Selector: Backport jQuery selection context logic to selector-native 2023-02-13 18:34:41 +01:00
css.js Build: Run GitHub Action browser tests on Playwright WebKit 2023-01-23 23:49:44 +01:00
data.js Docs: Fix incorrect trac-NUMBER references 2022-01-12 23:23:42 +01:00
deferred.js Deferred: Rename getStackHook to getErrorHook 2023-03-14 22:32:45 +01:00
deprecated.js Tests: Test AJAX deprecated event aliases properly 2023-03-15 11:44:08 +01:00
dimensions.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
effects.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
event.js Event: Simulate focus/blur in IE via focusin/focusout 2023-03-27 21:22:38 +02:00
exports.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
manipulation.js Selector:Manipulation: Fix DOM manip within template contents 2022-11-14 23:17:23 +01:00
offset.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
queue.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
ready.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
selector.js Selector: Backport jQuery selection context logic to selector-native 2023-02-13 18:34:41 +01:00
serialize.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
support.js Selector: Stop relying on CSS.supports( "selector(...)" ) 2023-02-14 10:11:40 +01:00
traversing.js Selector: Backport jQuery selection context logic to selector-native 2023-02-13 18:34:41 +01:00
tween.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00
wrap.js Tests: Exclude tests based on compilation flags, not API presence 2022-06-28 12:39:01 +02:00