BaseOverlay
Extends:
The base element for Overlay components
Static Member Summary
Static Public Members | ||
public static |
Returns BaseOverlay fadetime in milliseconds. |
|
public static |
Returns BaseOverlay focus on show options. |
|
public static |
Returns BaseOverlay return focus options. |
|
public static |
Returns BaseOverlay scroll focus options. |
|
public static |
Returns BaseOverlay trap focus options. |
Member Summary
Public Members | ||
public |
returns element that will receive focus when overlay is hidden |
|
public |
Whether to focus the overlay, when opened or not. |
|
public |
Whether this overlay is open or not. |
|
public |
Whether to return focus to the previously focused element when closed. |
|
public |
returnFocusToElement: *: * returns element that will receive focus when overlay is closed |
|
public |
Whether the browser should scroll the document to bring the newly-focused element into view. |
|
public |
Whether to trap tabs and keep them within the overlay. |
Method Summary
Public Methods | ||
public |
hide(): BaseOverlay Close the overlay. |
|
public |
returnFocusTo(element: HTMLElement): BaseOverlay Set the element that focus should be returned to when the overlay is hidden. |
|
public |
show(): BaseOverlay Open the overlay and set the z-index accordingly. |
Static Public Members
public static focusOnShow: OverlayFocusOnShowEnum: * source
Returns BaseOverlay focus on show options.
public static returnFocus: OverlayReturnFocusEnum: * source
Returns BaseOverlay return focus options.
public static scrollOnFocus: OverlayScrollOnFocusEnum: * source
Returns BaseOverlay scroll focus options.
Public Members
public elementToFocusWhenHidden: HTMLElement: * source
returns element that will receive focus when overlay is hidden
public focusOnShow: HTMLElement | String source
Whether to focus the overlay, when opened or not. By default the overlay itself will get the focus. It also accepts an instance of HTMLElement or a selector like ':first-child' or 'button:last-of-type'. If the selector returns multiple elements, it will focus the first element inside the overlay that matches the selector. See OverlayFocusOnShowEnum.
OverlayFocusOnShowEnum.ON
by default.
public returnFocus: String source
Whether to return focus to the previously focused element when closed. See OverlayReturnFocusEnum.
OverlayReturnFocusEnum.OFF
by default.
public returnFocusToElement: *: * source
returns element that will receive focus when overlay is closed
Return:
* | {HTMLElement}element passed via returnFocusTo() |
public scrollOnFocus: String source
Whether the browser should scroll the document to bring the newly-focused element into view. See OverlayScrollOnFocusEnum.
OverlayScrollOnFocusEnum.ON
by default.
public trapFocus: String source
Whether to trap tabs and keep them within the overlay. See OverlayTrapFocusEnum.
OverlayTrapFocusEnum.OFF
by default.
Public Methods
public returnFocusTo(element: HTMLElement): BaseOverlay source
Set the element that focus should be returned to when the overlay is hidden.
Params:
Name | Type | Attribute | Description |
element | HTMLElement | The element to return focus to. This must be a DOM element, not a jQuery object or selector. |