diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2024-05-01 00:54:19 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2024-05-15 00:38:40 +0200 |
commit | bb49bd794bc8ea4238162725b518fb46234f3cf9 (patch) | |
tree | db7b6152daac9f2c6b5fd051ab5d3b7ec7382791 /tests/unit/dialog | |
parent | daa6fb55b35065c49c0ffc879c94627bbf85404c (diff) | |
download | jquery-ui-bb49bd794bc8ea4238162725b518fb46234f3cf9.tar.gz jquery-ui-bb49bd794bc8ea4238162725b518fb46234f3cf9.zip |
All: Drop support for IE & some other browsers (but mostly IE)
Closes gh-2249
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/core.js | 42 | ||||
-rw-r--r-- | tests/unit/dialog/methods.js | 5 |
2 files changed, 6 insertions, 41 deletions
diff --git a/tests/unit/dialog/core.js b/tests/unit/dialog/core.js index cb0ee53e0..d307504b8 100644 --- a/tests/unit/dialog/core.js +++ b/tests/unit/dialog/core.js @@ -103,12 +103,6 @@ QUnit.test( "focus tabbable", function( assert ) { }; function checkFocus( markup, options, testFn, next ) { - - // Support: IE8 - // For some reason the focus doesn't get set properly if we don't - // focus the body first. - $( "body" ).trigger( "focus" ); - element = $( markup ).dialog( options ); setTimeout( function() { testFn( function done() { @@ -122,31 +116,12 @@ QUnit.test( "focus tabbable", function( assert ) { checkFocus( "<div><input><input></div>", options, function( done ) { var input = element.find( "input" ).last().trigger( "focus" ).trigger( "blur" ); - // Support: IE 11+ - // In IE in jQuery 3.4+ a sequence: - // $( inputNode ).trigger( "focus" ).trigger( "blur" ).trigger( "focus" ) - // doesn't end up with a focused input. See: - // https://github.com/jquery/jquery/issues/4856 - // 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. - if ( document.documentMode ) { - setTimeout( function() { - focusTabbableAndAssert(); - }, 500 ); - } else { - focusTabbableAndAssert(); - } - - function focusTabbableAndAssert() { - element.dialog( "instance" )._focusTabbable(); - setTimeout( function() { - assert.equal( document.activeElement, input[ 0 ], - "1. an element that was focused previously." ); - done(); - } ); - } + element.dialog( "instance" )._focusTabbable(); + setTimeout( function() { + assert.equal( document.activeElement, input[ 0 ], + "1. an element that was focused previously." ); + done(); + } ); }, step2 ); } @@ -303,11 +278,6 @@ QUnit.test( "interaction between overlay and other dialogs", function( assert ) second = $( "<div><input id='input-2'></div>" ).testWidget(), secondInput = second.find( "input" ); - // Support: IE8 - // For some reason the focus doesn't get set properly if we don't - // focus the body first. - $( "body" ).trigger( "focus" ); - // Wait for the modal to init setTimeout( function() { diff --git a/tests/unit/dialog/methods.js b/tests/unit/dialog/methods.js index 1de32194b..c3f360fb9 100644 --- a/tests/unit/dialog/methods.js +++ b/tests/unit/dialog/methods.js @@ -226,11 +226,6 @@ QUnit.test( "#8958: dialog can be opened while opening", function( assert ) { } } ); - // Support: IE8 - // For some reason the #favorite-animal input doesn't get focus if we don't - // focus the body first, causing the test to hang. - $( "body" ).trigger( "focus" ); - $( "#favorite-animal" ) // We focus the input to start the test. Once it receives focus, the |