Resolve #3397785 "Dialog focus is"
Closes #3397785
Merge request reports
Activity
added 130 commits
-
a115d1c7...7cb99a11 - 126 commits from branch
project:11.x
- df3880f2 - Add test coverage
- 0ba3d464 - Add fix
- b3914fae - prettier
- 4bd652bc - test fix
Toggle commit list-
a115d1c7...7cb99a11 - 126 commits from branch
added 30 commits
-
4bd652bc...b20ec518 - 27 commits from branch
project:11.x
- b160b0ca - Add test coverage
- b124e98f - Add fix
- 44656dae - test fix
Toggle commit list-
4bd652bc...b20ec518 - 27 commits from branch
42 42 // In these instances, force focus on the dialog. 43 43 if (document.activeElement === document.body) { 44 44 $dialog.dialog('widget').trigger('focus'); changed this line in version 8 of the diff
41 41 // If the body element has focus, it means focus was effectively lost. 42 42 // In these instances, force focus on the dialog. 43 43 if (document.activeElement === document.body) { 44 $dialog.dialog('widget').trigger('focus'); 44 // Bypass media as it has its own focus handling. 45 if ( 46 document.getElementsByClassName('media-library-widget-modal').length changed this line in version 13 of the diff
added 24 commits
-
8a715f6e...5ed165d5 - 15 commits from branch
project:11.x
- 7100a2f2 - Add test coverage
- 82fddb2f - Add fix
- 2bec9a22 - test fix
- 7edfacb0 - Removed extra code
- fb56d7d0 - Fix EntityReferenceWidgetTest
- d707da04 - reverted media_library changes
- 74ccd5a2 - bypassed media
- 1a6cbb4f - test fix
- 937aa27d - media focus fix
Toggle commit list-
8a715f6e...5ed165d5 - 15 commits from branch
added 13 commits
-
937aa27d...ca9af3d9 - 3 commits from branch
project:11.x
- 425a5b9a - Add test coverage
- 3486dca8 - Add fix
- b479da56 - test fix
- c053d988 - Removed extra code
- be1f99f2 - Fix EntityReferenceWidgetTest
- 191dba9a - reverted media_library changes
- 23680dfe - bypassed media
- 54698baa - test fix
- 29d550aa - media focus fix
- 082c8d04 - checked if focus is inside of body
Toggle commit list-
937aa27d...ca9af3d9 - 3 commits from branch
39 39 } 40 40 41 // If the body element has focus, it means focus was effectively lost. 42 // In these instances, force focus on the dialog. 43 if (document.activeElement === document.body) { 44 $dialog.dialog('widget').trigger('focus'); 45 } 41 // If the focus is outside of active element move it to the first focusable element. 42 setTimeout(function () { 43 const dialogInstance = $dialog.dialog('instance'); 44 45 // Check if the dialog has focus 46 if (dialogInstance && dialogInstance._focusedElement) { 47 const focusedElement = dialogInstance._focusedElement; 48 // Check if the focused element is inside the document.body 49 const isInsideBody = document.body.contains(focusedElement[0]); changed this line in version 17 of the diff
added 21 commits
-
5f1319a2...27c6d955 - 7 commits from branch
project:11.x
- 27c6d955...77862102 - 4 earlier commits
- 28daa09b - Fix EntityReferenceWidgetTest
- 0adf7a0f - reverted media_library changes
- cbf38632 - bypassed media
- a8d710a0 - test fix
- 553ebd7d - media focus fix
- f268a7c8 - checked if focus is inside of body
- 5da2afae - test fix
- 334e5c5d - changed comment
- b1595226 - checked inside dialog
- f42b81f5 - changed variable name
Toggle commit list-
5f1319a2...27c6d955 - 7 commits from branch
41 // If the body element has focus, it means focus was effectively lost. 42 // In these instances, force focus on the dialog. 43 if (document.activeElement === document.body) { 44 $dialog.dialog('widget').trigger('focus'); 45 } 41 // If the focus is outside of active element move it to the first focusable element. 42 setTimeout(function () { 43 const dialogInstance = $dialog.dialog('instance'); 44 45 // Check if the dialog has focus. 46 if (dialogInstance && dialogInstance._focusedElement) { 47 const focusedElement = dialogInstance._focusedElement; 48 // Check if the focused element is inside the dialog. 49 const isInsideDialog = $dialog[0].contains(focusedElement[0]); 50 51 if (!isInsideDialog || document.activeElement === document.body) { changed this line in version 18 of the diff
Please register or sign in to reply