react-aria-modal
Advanced tools
Comparing version 3.0.0 to 3.0.1
# Changelog | ||
## 3.0.1 | ||
- Fix bug causing click on the scrollbar (visible because the modal vertically overflows the viewport) to close the modal. | ||
## 3.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -34,3 +34,5 @@ 'use strict'; | ||
}, _this.checkUnderlayClick = function (event) { | ||
if (_this.dialogNode && _this.dialogNode.contains(event.target)) return; | ||
if (_this.dialogNode && _this.dialogNode.contains(event.target) | ||
// If the click is on the scrollbar we don't want to close the modal. | ||
|| event.pageX > event.target.clientWidth || event.pageY > event.target.clientHeight) return; | ||
_this.exit(); | ||
@@ -37,0 +39,0 @@ }, _this.checkDocumentKeyDown = function (event) { |
{ | ||
"name": "react-aria-modal", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "A fully accessible and flexible React modal built according WAI-ARIA Authoring Practices", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-aria-modal.js", |
@@ -74,3 +74,8 @@ const React = require('react'); | ||
checkUnderlayClick = event => { | ||
if (this.dialogNode && this.dialogNode.contains(event.target)) return; | ||
if ( | ||
this.dialogNode && this.dialogNode.contains(event.target) | ||
// If the click is on the scrollbar we don't want to close the modal. | ||
|| event.pageX > event.target.clientWidth | ||
|| event.pageY > event.target.clientHeight | ||
) return; | ||
this.exit(); | ||
@@ -77,0 +82,0 @@ }; |
175523
426