]> source.dussan.org Git - jquery-ui.git/commit
Tests: Fix the "dialog: core: focus tabbable" test in IE
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 16 Mar 2021 21:17:25 +0000 (22:17 +0100)
committerGitHub <noreply@github.com>
Tue, 16 Mar 2021 21:17:25 +0000 (22:17 +0100)
commitdff0dc0d6af9834f03902fe260b51a15de3ab498
treeea14daa29b8ace004d32ccca430581b1191ab935
parente31cf579a0f3e64250af2e7269eef2e6c6e3d8fb
Tests: Fix the "dialog: core: focus tabbable" test in IE

In IE in jQuery 3.4+ a sequence:
```js
$( inputNode ).trigger( "focus" ).trigger( "blur" ).trigger( "focus" );
```
doesn't end up with a focused input. However, in this test we only want to check
that the last focused input receives the focus back when `_focusTabbable()` is
called which in reality doesn't happen so quickly so let's avoid the issue by
waiting a bit.

Ref jquery/jquery#4856
Closes gh-1951
tests/unit/dialog/core.js