Skip to content

Commit

Permalink
Release v2.0.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Jun 20, 2017
1 parent 1676259 commit 8f3898a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 15 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
v2.0.6 - Tue, 20 Jun 2017 11:22:57 UTC
--------------------------------------

- [07a2753](../../commit/07a2753) [fixed] check if the modal content is available when async update... (#1)
- [cb6504c](../../commit/cb6504c) [fixed] Use bound ref functions
- [7da6ec8](../../commit/7da6ec8) [fix] Unnecessary renders when modal is closed
- [648cc2f](../../commit/648cc2f) [fixed] update script path on bootstrap example.
- [6c780ae](../../commit/6c780ae) Update react-addons-test-utils to react-dom/test-utils
- [385a8eb](../../commit/385a8eb) Update react dependencies
- [8480042](../../commit/8480042) [chore] cache yarn when running on travis-ci.
- [8d87599](../../commit/8d87599) [chore] added documentation for development.
- [aaeb310](../../commit/aaeb310) [chore] added patterns on .gitignore.
- [4ec7184](../../commit/4ec7184) [chode] Add table of contents
- [96fdb90](../../commit/96fdb90) [chore] don't test on node versions < 6.x.y.
- [20fcdc3](../../commit/20fcdc3) [chore] update README.md.
- [4b57b2a](../../commit/4b57b2a) [chore] added script to regenerate all the changelog.
- [21dc212](../../commit/21dc212) [chore] ask before publishing...
- [2af9b89](../../commit/2af9b89) chore] improve publish docs commands.


v2.0.2 - Fri, 16 Jun 2017 13:10:06 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": "2.0.2",
"version": "2.0.6",
"homepage": "https://github.com/reactjs/react-modal",
"authors": [
"Ryan Florence",
Expand Down
29 changes: 18 additions & 11 deletions dist/react-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,13 @@ return /******/ (function(modules) { // webpackBootstrap
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(newProps) {
if (newProps.isOpen) refCount.add(this);
if (!newProps.isOpen) refCount.remove(this);
var isOpen = newProps.isOpen;
// Stop unnecessary renders if modal is remaining closed

if (!this.props.isOpen && !isOpen) return;

if (isOpen) refCount.add(this);
if (!isOpen) refCount.remove(this);
var currentParent = getParentElement(this.props.parentSelector);
var newParent = getParentElement(newProps.parentSelector);

Expand Down Expand Up @@ -1385,6 +1390,14 @@ return /******/ (function(modules) { // webpackBootstrap
_this.focusAfterRender = focus;
};

_this.setOverlayRef = function (overlay) {
_this.overlay = overlay;
};

_this.setContentRef = function (content) {
_this.content = content;
};

_this.afterClose = function () {
focusManager.returnFocus();
focusManager.teardownScopedFocus();
Expand Down Expand Up @@ -1416,7 +1429,7 @@ return /******/ (function(modules) { // webpackBootstrap
};

_this.focusContent = function () {
return !_this.contentHasFocus() && _this.content.focus();
return _this.content && !_this.contentHasFocus() && _this.content.focus();
};

_this.closeWithTimeout = function () {
Expand Down Expand Up @@ -1544,8 +1557,6 @@ return /******/ (function(modules) { // webpackBootstrap
}, {
key: 'render',
value: function render() {
var _this2 = this;

var _props = this.props,
className = _props.className,
overlayClassName = _props.overlayClassName,
Expand All @@ -1557,18 +1568,14 @@ return /******/ (function(modules) { // webpackBootstrap
return this.shouldBeClosed() ? _react2.default.createElement('div', null) : _react2.default.createElement(
'div',
{
ref: function ref(overlay) {
_this2.overlay = overlay;
},
ref: this.setOverlayRef,
className: this.buildClassName('overlay', overlayClassName),
style: _extends({}, overlayStyles, this.props.style.overlay),
onClick: this.handleOverlayOnClick },
_react2.default.createElement(
'div',
{
ref: function ref(content) {
_this2.content = content;
},
ref: this.setContentRef,
style: _extends({}, contentStyles, this.props.style.content),
className: this.buildClassName('content', className),
tabIndex: '-1',
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": "2.0.2",
"version": "2.0.6",
"description": "Accessible modal dialog component for React.JS",
"main": "./lib/index.js",
"repository": {
Expand Down

0 comments on commit 8f3898a

Please sign in to comment.