jquery/test/unit
Michał Gołębiowski-Owczarek dbcffb396c
Event: Make focus re-triggering not focus the original element back
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
2020-12-07 20:28:44 +01:00
..
ajax.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
animation.js Build: Update Sinon from 2.3.7 to 7.3.1, other updates 2019-04-04 16:53:38 +02:00
attributes.js Attributes: Drop the toggleClass(boolean|undefined) signature 2020-09-01 10:42:03 +02:00
basic.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
callbacks.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
core.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
css.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
data.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
deferred.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
deprecated.js Deprecated: Remove jQuery.trim 2020-05-18 23:20:38 +02:00
dimensions.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
effects.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
event.js Event: Make focus re-triggering not focus the original element back 2020-12-07 20:28:44 +01:00
exports.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
manipulation.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
offset.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
queue.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
ready.js Tests: Pass a number of necessary done() calls to assert.async() 2020-03-02 22:15:06 +01:00
selector.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
serialize.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
support.js Core: Drop support for Edge Legacy (i.e. non-Chromium Microsoft Edge) 2020-09-22 17:49:28 +02:00
traversing.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
tween.js Build: Update Sinon from 2.3.7 to 7.3.1, other updates 2019-04-04 16:53:38 +02:00
wrap.js Tests: Remove remaining obsolete jQuery.cache references 2020-05-18 18:43:01 +02:00