File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
packages/core/src/browser Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -241,10 +241,17 @@ export abstract class AbstractDialog<T> extends BaseWidget {
241
241
this . toDisposeOnDetach . push ( DialogOverlayService . get ( ) . push ( this ) ) ;
242
242
}
243
243
244
- protected preventTabbingOutsideDialog ( ) : Disposable {
245
- const nonInertSiblings = Array . from ( this . node . ownerDocument . body . children ) . filter ( child => child !== this . node && ! ( child . hasAttribute ( 'inert' ) ) ) ;
246
- nonInertSiblings . forEach ( child => child . setAttribute ( 'inert' , '' ) ) ;
247
- return Disposable . create ( ( ) => nonInertSiblings . forEach ( child => child . removeAttribute ( 'inert' ) ) ) ;
244
+ /**
245
+ * This prevents tabbing outside the dialog by marking elements as inert, i.e., non-clickable and non-focussable.
246
+ *
247
+ * @param elements the elements for which we disable tabbing. By default all elements within the body element are considered.
248
+ * Please note that this may also include other popups such as the suggestion overlay, the notification center or quick picks.
249
+ * @returns a disposable that will restore the previous tabbing behavior
250
+ */
251
+ protected preventTabbingOutsideDialog ( elements = Array . from ( this . node . ownerDocument . body . children ) ) : Disposable {
252
+ const nonInertElements = elements . filter ( child => child !== this . node && ! ( child . hasAttribute ( 'inert' ) ) ) ;
253
+ nonInertElements . forEach ( child => child . setAttribute ( 'inert' , '' ) ) ;
254
+ return Disposable . create ( ( ) => nonInertElements . forEach ( child => child . removeAttribute ( 'inert' ) ) ) ;
248
255
}
249
256
250
257
protected handleEscape ( event : KeyboardEvent ) : boolean | void {
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ import { PreviewableWidget } from '../widgets/previewable-widget';
47
47
import { WindowService } from '../window/window-service' ;
48
48
49
49
/** The class name added to ApplicationShell instances. */
50
- const APPLICATION_SHELL_CLASS = 'theia-ApplicationShell' ;
50
+ export const APPLICATION_SHELL_CLASS = 'theia-ApplicationShell' ;
51
51
/** The class name added to the main and bottom area panels. */
52
- const MAIN_BOTTOM_AREA_CLASS = 'theia-app-centers' ;
52
+ export const MAIN_BOTTOM_AREA_CLASS = 'theia-app-centers' ;
53
53
/** Status bar entry identifier for the bottom panel toggle button. */
54
- const BOTTOM_PANEL_TOGGLE_ID = 'bottom-panel-toggle' ;
54
+ export const BOTTOM_PANEL_TOGGLE_ID = 'bottom-panel-toggle' ;
55
55
/** The class name added to the main area panel. */
56
- const MAIN_AREA_CLASS = 'theia-app-main' ;
56
+ export const MAIN_AREA_CLASS = 'theia-app-main' ;
57
57
/** The class name added to the bottom area panel. */
58
- const BOTTOM_AREA_CLASS = 'theia-app-bottom' ;
58
+ export const BOTTOM_AREA_CLASS = 'theia-app-bottom' ;
59
59
60
60
export type ApplicationShellLayoutVersion =
61
61
/** layout versioning is introduced, unversioned layout are not compatible */
You can’t perform that action at this time.
0 commit comments