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