API reference for SfTrackFocusDirective

import {SfCommonModule} from "@progress/sitefinity-component-framework";


attribute: sfTrackFocus description: Tracks the focus events of an element

Hierarchy (view full)

Implements

  • OnDestroy
  • OnInit

Constructors

Properties

closeOnContentClick: boolean = true

Whether to close/focus out on click

closeOnEnterKey: boolean = true

Whether to close/focus out on pressing of Enter key

closeOnEscape: boolean = true

Whether to close/focus out on pressing of Escape key

contentFocusIn: EventEmitter<any> = ...

Content focus in emitter

contentFocusOut: EventEmitter<any> = ...

Content focus out emitter

focusSubscription: BehaviorSubject<boolean> = ...

Emitted when document click and window keydown event listeners should be added/removed

windowElement: Window

Sets the window element

Methods

  • Returns void

  • Returns void

  • Handles document click Calls focus out if a click occurs outside of the element

    Parameters

    • event: Event

    Returns void

  • Handles document enter key Calls focus out on enter if closeEnterKey is true Calls focus out on escape if closeOnEscape is true Calls focus out when tab or shift + tab are pressed

    Parameters

    • event: Event

    Returns void

  • Handles element click Emits focus in if the element is not focused and calls focus out if it is already focused

    Parameters

    • event: Event

    Returns void

  • Handles mouseDown event of element

    Returns void

  • Handles mouseUp event of element

    Returns void

  • Parameters

    • sub: Subscription

    Returns void

Generated using TypeDoc