@rc-component/util 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/Dom/focus.js CHANGED
@@ -89,7 +89,9 @@ function syncFocus() {
89
89
  if (lastElement && !hasFocus(lastElement)) {
90
90
  const focusableList = getFocusNodeList(lastElement);
91
91
  const matchElement = focusableList.includes(lastFocusElement) ? lastFocusElement : focusableList[0];
92
- matchElement?.focus();
92
+ matchElement?.focus({
93
+ preventScroll: true
94
+ });
93
95
  } else {
94
96
  lastFocusElement = activeElement;
95
97
  }
package/lib/Dom/focus.js CHANGED
@@ -99,7 +99,9 @@ function syncFocus() {
99
99
  if (lastElement && !hasFocus(lastElement)) {
100
100
  const focusableList = getFocusNodeList(lastElement);
101
101
  const matchElement = focusableList.includes(lastFocusElement) ? lastFocusElement : focusableList[0];
102
- matchElement?.focus();
102
+ matchElement?.focus({
103
+ preventScroll: true
104
+ });
103
105
  } else {
104
106
  lastFocusElement = activeElement;
105
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rc-component/util",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Common Utils For React Component",
5
5
  "keywords": [
6
6
  "react",