Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleFrameClick = (event, frame) => {
if (!contains(this._contextElement, frame)) {
// dismiss if frame is not within the region
this.handleDismiss(event, true)
}
}
captureDocumentClick = event => {
const { target } = event
this._preventCloseOnDocumentClick = event.button !== 0 || contains(this._contextElement, target)
}