Reference Source
public class | source

BaseOverlay

Extends:

superClass → BaseOverlay

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

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

Close the overlay.

public

Set the element that focus should be returned to when the overlay is hidden.

public

Open the overlay and set the z-index accordingly.

Static Public Members

public static FADETIME: Number: * source

Returns BaseOverlay fadetime in milliseconds.

Return:

Number

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 static trapFocus: OverlayTrapFocusEnum: * source

Returns BaseOverlay trap focus options.

Public Members

public elementToFocusWhenHidden: HTMLElement: * source

returns element that will receive focus when overlay is hidden

Return:

HTMLElement

element cached

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 open: Boolean source

Whether this overlay is open or not.

  • false by default.
  • reflected

Emit:

coral-overlay:open

coral-overlay:close

coral-overlay:beforeopen

coral-overlay:beforeclose

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 hide(): BaseOverlay source

Close the overlay.

Return:

BaseOverlay

this, chainable

public returnFocusTo(element: HTMLElement): BaseOverlay source

Set the element that focus should be returned to when the overlay is hidden.

Params:

NameTypeAttributeDescription
element HTMLElement

The element to return focus to. This must be a DOM element, not a jQuery object or selector.

Return:

BaseOverlay

this, chainable

public show(): BaseOverlay source

Open the overlay and set the z-index accordingly.

Return:

BaseOverlay

this, chainable