react-aria-modal
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -33,5 +33,4 @@ var React = require('react'); | ||
if (!this.props.titleText && !this.props.titleId) { | ||
throw new Error('react-aria-modal instances should have a `title` or `titleId`'); | ||
throw new Error('react-aria-modal instances should have a `titleText` or `titleId`'); | ||
} | ||
noScroll.on(); | ||
@@ -48,3 +47,3 @@ }, | ||
if (React.findDOMNode(this.refs.dialog).contains(e.target)) return; | ||
this.props.onExit() | ||
this.deactivate(); | ||
}, | ||
@@ -92,2 +91,3 @@ | ||
role: (this.props.alert) ? 'alertdialog' : 'dialog', | ||
id: 'react-aria-modal-dialog', | ||
style: { | ||
@@ -111,3 +111,3 @@ position: 'absolute', | ||
if (this.props.focusDialog) { | ||
dialogProps.tabIndex = '0'; | ||
dialogProps.tabIndex = '-1'; | ||
dialogProps.style.outline = 0; | ||
@@ -118,3 +118,5 @@ } | ||
{ | ||
initialFocus: this.props.initialFocus, | ||
initialFocus: (this.props.focusDialog) | ||
? '#react-aria-modal-dialog' | ||
: this.props.initialFocus, | ||
onDeactivate: this.deactivate, | ||
@@ -121,0 +123,0 @@ }, |
{ | ||
"name": "react-aria-modal", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A fully accessible and flexible React modal built according WAI-ARIA Authoring Practices", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32520
500