Skip to content

Commit

Permalink
Release v3.0.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Oct 18, 2017
1 parent 5ec0f7f commit 5f5c2f0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v3.0.4 - Wed, 18 Oct 2017 19:52:46 UTC
--------------------------------------

- [1fb33d9](../../commit/1fb33d9) [chore] run tests only on node 8.
- [59fbdb3](../../commit/59fbdb3) [chore] specifiy the object when overriding class names.


v3.0.3 - Sat, 14 Oct 2017 17:37:10 UTC
--------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-modal",
"version": "3.0.3",
"version": "3.0.4",
"homepage": "https://github.com/reactjs/react-modal",
"authors": [
"Ryan Florence",
Expand Down
23 changes: 16 additions & 7 deletions dist/react-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,16 @@ Modal.propTypes = {
}),
portalClassName: _propTypes2.default.string,
bodyOpenClassName: _propTypes2.default.string,
className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({
base: _propTypes2.default.string.isRequired,
afterOpen: _propTypes2.default.string.isRequired,
beforeClose: _propTypes2.default.string.isRequired
})]),
overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({
base: _propTypes2.default.string.isRequired,
afterOpen: _propTypes2.default.string.isRequired,
beforeClose: _propTypes2.default.string.isRequired
})]),
appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),
onAfterOpen: _propTypes2.default.func,
onRequestClose: _propTypes2.default.func,
Expand Down Expand Up @@ -1628,6 +1636,8 @@ var ModalPortal = function (_Component) {
};

_this.afterClose = function () {
// Remove body class
bodyClassList.remove(_this.props.bodyOpenClassName);
focusManager.returnFocus();
focusManager.teardownScopedFocus();
};
Expand Down Expand Up @@ -1815,6 +1825,8 @@ var ModalPortal = function (_Component) {
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
// Remove body class
bodyClassList.remove(this.props.bodyOpenClassName);
this.beforeClose();
clearTimeout(this.closeTimer);
}
Expand All @@ -1838,12 +1850,9 @@ var ModalPortal = function (_Component) {
value: function beforeClose() {
var _props2 = this.props,
appElement = _props2.appElement,
ariaHideApp = _props2.ariaHideApp,
bodyOpenClassName = _props2.bodyOpenClassName;
// Remove class if no more modals are open

bodyClassList.remove(bodyOpenClassName);
ariaHideApp = _props2.ariaHideApp;
// Reset aria-hidden attribute if all modals have been removed

if (ariaHideApp && refCount.totalCount() < 1) {
ariaAppHider.show(appElement);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/react-modal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-modal",
"version": "3.0.3",
"version": "3.0.4",
"description": "Accessible modal dialog component for React.JS",
"main": "./lib/index.js",
"repository": {
Expand Down

0 comments on commit 5f5c2f0

Please sign in to comment.