How to use the @instructure/ui-dom-utils.contains function in @instructure/ui-dom-utils

To help you get started, we’ve selected a few @instructure/ui-dom-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instructure / instructure-ui / packages / ui-a11y / src / FocusRegion.js View on Github external
handleFrameClick = (event, frame) => {
    if (!contains(this._contextElement, frame)) {
      // dismiss if frame is not within the region
      this.handleDismiss(event, true)
    }
  }
github instructure / instructure-ui / packages / ui-a11y / src / FocusRegion.js View on Github external
captureDocumentClick = event => {
    const { target } = event
    this._preventCloseOnDocumentClick = event.button !== 0 || contains(this._contextElement, target)
  }