Socket
Socket
Sign inDemoInstall

rc-dialog

Package Overview
Dependencies
Maintainers
11
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-dialog - npm Package Compare versions

Comparing version 9.5.0 to 9.5.1

12

es/Dialog/Content/Panel.js

@@ -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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc