@lvce-editor/virtual-dom 1.30.0 → 1.31.0

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/dist/index.js CHANGED
@@ -718,7 +718,9 @@ const rememberFocus = ($Viewlet, dom, eventMap, uid = 0) => {
718
718
  if (focused) {
719
719
  const $NewFocused = $New.querySelector(`[name="${focused}"]`);
720
720
  if ($NewFocused) {
721
- $NewFocused.replaceWith($Hidden.firstChild);
721
+ const $Previous = $Hidden.firstChild;
722
+ $Previous.className = $NewFocused.className;
723
+ $NewFocused.replaceWith($Previous);
722
724
  }
723
725
  }
724
726
  $Hidden.remove();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -45,7 +45,9 @@ export const rememberFocus = (
45
45
  if (focused) {
46
46
  const $NewFocused = $New.querySelector(`[name="${focused}"]`)
47
47
  if ($NewFocused) {
48
- $NewFocused.replaceWith($Hidden.firstChild as HTMLElement)
48
+ const $Previous = $Hidden.firstChild as HTMLElement
49
+ $Previous.className = $NewFocused.className
50
+ $NewFocused.replaceWith($Previous)
49
51
  }
50
52
  }
51
53
  $Hidden.remove()