rc-dialog
Advanced tools
Comparing version 9.5.0 to 9.5.1
@@ -54,3 +54,5 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var _entityRef$current; | ||
(_entityRef$current = entityRef.current) === null || _entityRef$current === void 0 || _entityRef$current.focus(); | ||
(_entityRef$current = entityRef.current) === null || _entityRef$current === void 0 || _entityRef$current.focus({ | ||
preventScroll: true | ||
}); | ||
}, | ||
@@ -61,5 +63,9 @@ changeActive: function changeActive(next) { | ||
if (next && activeElement === sentinelEndRef.current) { | ||
sentinelStartRef.current.focus(); | ||
sentinelStartRef.current.focus({ | ||
preventScroll: true | ||
}); | ||
} else if (!next && activeElement === sentinelStartRef.current) { | ||
sentinelEndRef.current.focus(); | ||
sentinelEndRef.current.focus({ | ||
preventScroll: true | ||
}); | ||
} | ||
@@ -66,0 +72,0 @@ } |
@@ -142,6 +142,4 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
// keep focus inside dialog | ||
if (visible) { | ||
if (e.keyCode === KeyCode.TAB) { | ||
contentRef.current.changeActive(!e.shiftKey); | ||
} | ||
if (visible && e.keyCode === KeyCode.TAB) { | ||
contentRef.current.changeActive(!e.shiftKey); | ||
} | ||
@@ -148,0 +146,0 @@ } |
@@ -15,2 +15,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
* */ | ||
var DialogWrap = function DialogWrap(props) { | ||
@@ -17,0 +18,0 @@ var visible = props.visible, |
@@ -64,3 +64,5 @@ "use strict"; | ||
var _entityRef$current; | ||
(_entityRef$current = entityRef.current) === null || _entityRef$current === void 0 || _entityRef$current.focus(); | ||
(_entityRef$current = entityRef.current) === null || _entityRef$current === void 0 || _entityRef$current.focus({ | ||
preventScroll: true | ||
}); | ||
}, | ||
@@ -71,5 +73,9 @@ changeActive: function changeActive(next) { | ||
if (next && activeElement === sentinelEndRef.current) { | ||
sentinelStartRef.current.focus(); | ||
sentinelStartRef.current.focus({ | ||
preventScroll: true | ||
}); | ||
} else if (!next && activeElement === sentinelStartRef.current) { | ||
sentinelEndRef.current.focus(); | ||
sentinelEndRef.current.focus({ | ||
preventScroll: true | ||
}); | ||
} | ||
@@ -76,0 +82,0 @@ } |
@@ -152,6 +152,4 @@ "use strict"; | ||
// keep focus inside dialog | ||
if (visible) { | ||
if (e.keyCode === _KeyCode.default.TAB) { | ||
contentRef.current.changeActive(!e.shiftKey); | ||
} | ||
if (visible && e.keyCode === _KeyCode.default.TAB) { | ||
contentRef.current.changeActive(!e.shiftKey); | ||
} | ||
@@ -158,0 +156,0 @@ } |
@@ -25,2 +25,3 @@ "use strict"; | ||
* */ | ||
var DialogWrap = function DialogWrap(props) { | ||
@@ -27,0 +28,0 @@ var visible = props.visible, |
{ | ||
"name": "rc-dialog", | ||
"version": "9.5.0", | ||
"version": "9.5.1", | ||
"description": "dialog ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
77879
1765