rc-dialog
Advanced tools
Comparing version 8.2.0 to 8.2.1
@@ -68,3 +68,5 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
afterClose = _this$props.afterClose, | ||
getOpenCount = _this$props.getOpenCount; // need demo? | ||
getOpenCount = _this$props.getOpenCount, | ||
focusTriggerAfterClose = _this$props.focusTriggerAfterClose, | ||
mask = _this$props.mask; // need demo? | ||
// https://github.com/react-component/dialog/pull/28 | ||
@@ -83,2 +85,12 @@ | ||
if (mask && _this.lastOutSideFocusNode && focusTriggerAfterClose) { | ||
try { | ||
_this.lastOutSideFocusNode.focus(); | ||
} catch (e) { | ||
_this.lastOutSideFocusNode = null; | ||
} | ||
_this.lastOutSideFocusNode = null; | ||
} | ||
if (afterClose) { | ||
@@ -369,6 +381,3 @@ afterClose(); | ||
value: function componentDidUpdate(prevProps) { | ||
var _this$props7 = this.props, | ||
visible = _this$props7.visible, | ||
mask = _this$props7.mask, | ||
focusTriggerAfterClose = _this$props7.focusTriggerAfterClose; | ||
var visible = this.props.visible; | ||
var mousePosition = this.props.mousePosition; | ||
@@ -394,12 +403,2 @@ | ||
this.inTransition = true; | ||
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) { | ||
try { | ||
this.lastOutSideFocusNode.focus(); | ||
} catch (e) { | ||
this.lastOutSideFocusNode = null; | ||
} | ||
this.lastOutSideFocusNode = null; | ||
} | ||
} | ||
@@ -410,5 +409,5 @@ } | ||
value: function componentWillUnmount() { | ||
var _this$props8 = this.props, | ||
visible = _this$props8.visible, | ||
getOpenCount = _this$props8.getOpenCount; | ||
var _this$props7 = this.props, | ||
visible = _this$props7.visible, | ||
getOpenCount = _this$props7.getOpenCount; | ||
@@ -415,0 +414,0 @@ if ((visible || this.inTransition) && !getOpenCount()) { |
@@ -89,3 +89,5 @@ "use strict"; | ||
afterClose = _this$props.afterClose, | ||
getOpenCount = _this$props.getOpenCount; // need demo? | ||
getOpenCount = _this$props.getOpenCount, | ||
focusTriggerAfterClose = _this$props.focusTriggerAfterClose, | ||
mask = _this$props.mask; // need demo? | ||
// https://github.com/react-component/dialog/pull/28 | ||
@@ -104,2 +106,12 @@ | ||
if (mask && _this.lastOutSideFocusNode && focusTriggerAfterClose) { | ||
try { | ||
_this.lastOutSideFocusNode.focus(); | ||
} catch (e) { | ||
_this.lastOutSideFocusNode = null; | ||
} | ||
_this.lastOutSideFocusNode = null; | ||
} | ||
if (afterClose) { | ||
@@ -389,6 +401,3 @@ afterClose(); | ||
value: function componentDidUpdate(prevProps) { | ||
var _this$props7 = this.props, | ||
visible = _this$props7.visible, | ||
mask = _this$props7.mask, | ||
focusTriggerAfterClose = _this$props7.focusTriggerAfterClose; | ||
var visible = this.props.visible; | ||
var mousePosition = this.props.mousePosition; | ||
@@ -414,12 +423,2 @@ | ||
this.inTransition = true; | ||
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) { | ||
try { | ||
this.lastOutSideFocusNode.focus(); | ||
} catch (e) { | ||
this.lastOutSideFocusNode = null; | ||
} | ||
this.lastOutSideFocusNode = null; | ||
} | ||
} | ||
@@ -430,5 +429,5 @@ } | ||
value: function componentWillUnmount() { | ||
var _this$props8 = this.props, | ||
visible = _this$props8.visible, | ||
getOpenCount = _this$props8.getOpenCount; | ||
var _this$props7 = this.props, | ||
visible = _this$props7.visible, | ||
getOpenCount = _this$props7.getOpenCount; | ||
@@ -435,0 +434,0 @@ if ((visible || this.inTransition) && !getOpenCount()) { |
{ | ||
"name": "rc-dialog", | ||
"version": "8.2.0", | ||
"version": "8.2.1", | ||
"description": "dialog ui component for react", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"gh-pages": "npm run build && father doc deploy", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish --any-branch", | ||
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", | ||
@@ -38,0 +38,0 @@ "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
60622
1522