Class: Modal

Modal()

Modal component.

Methods

(protected) _autoFocus(autoFocusSelector)

Automatically focuses the element specified by the given selector.
Parameters:
Name Type Description
autoFocusSelector boolean | string The selector, or false if no element should be automatically focused.
Source:

_defaultHideFn()

Run only if no listener calls event.preventDefault().
Source:

(protected) _handleDocumentFocus(eventnon-null)

Handles a `focus` event on the document. If the focused element is outside the modal and an overlay is being used, focuses the modal back.
Parameters:
Name Type Description
event Event
Source:

(protected) _handleKeyup(eventnon-null)

Handles document click in order to close the alert.
Parameters:
Name Type Description
event Event
Source:

(protected) _restrictFocus()

Restricts focus to the modal while it's visible.
Source:

(protected) _shiftFocusBack()

Shifts the focus back to the last element that had been focused before the modal was shown.
Source:

(protected) _unrestrictFocus()

Removes the handler that restricts focus to elements inside the modal.
Source:

(protected) _valueOverlayElementFn() → {Node}

Defines the default value for the `overlayElement` state key.
Source:
Returns:
Type
Node

attached()

Source:

created()

Source:

detached()

Source:

disposeInternal()

Source:

hide()

Emits a hide event.
Source:

show()

Shows the modal, setting its `visible` state key to true.
Source:

syncHideOnEscape(hideOnEscape)

Syncs the component according to the value of the `hideOnEscape` state key.
Parameters:
Name Type Description
hideOnEscape boolean
Source:

syncOverlay(overlay)

Syncs the component according to the value of the `overlay` state key.
Parameters:
Name Type Description
overlay boolean
Source:

syncVisible()

Syncs the component according to the value of the `visible` state key.
Source: