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 /ui/widgets/dialog.js | |
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 'ui/widgets/dialog.js')
-rw-r--r-- | ui/widgets/dialog.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/ui/widgets/dialog.js b/ui/widgets/dialog.js index cbda81636..4ba9d1117 100644 --- a/ui/widgets/dialog.js +++ b/ui/widgets/dialog.js @@ -31,8 +31,6 @@ "../focusable", "../keycode", "../position", - "../safe-active-element", - "../safe-blur", "../tabbable", "../unique-id", "../version", @@ -229,7 +227,7 @@ $.widget( "ui.dialog", { // Hiding a focused element doesn't trigger blur in WebKit // so in case we have nothing to focus on, explicitly blur the active element // https://bugs.webkit.org/show_bug.cgi?id=47182 - $.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) ); + $( this.document[ 0 ].activeElement ).trigger( "blur" ); } this._hide( this.uiDialog, this.options.hide, function() { @@ -273,7 +271,7 @@ $.widget( "ui.dialog", { } this._isOpen = true; - this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) ); + this.opener = $( this.document[ 0 ].activeElement ); this._size(); this._position(); @@ -329,7 +327,7 @@ $.widget( "ui.dialog", { }, _restoreTabbableFocus: function() { - var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), + var activeElement = this.document[ 0 ].activeElement, isActive = this.uiDialog[ 0 ] === activeElement || $.contains( this.uiDialog[ 0 ], activeElement ); if ( !isActive ) { @@ -340,11 +338,6 @@ $.widget( "ui.dialog", { _keepFocus: function( event ) { event.preventDefault(); this._restoreTabbableFocus(); - - // support: IE - // IE <= 8 doesn't prevent moving focus even with event.preventDefault() - // so we check again later - this._delay( this._restoreTabbableFocus ); }, _createWrapper: function() { @@ -427,9 +420,6 @@ $.widget( "ui.dialog", { } } ); - // Support: IE - // Use type="button" to prevent enter keypresses in textboxes from closing the - // dialog in IE (#9312) this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) .button( { label: $( "<a>" ).text( this.options.closeText ).html(), |