@lvce-editor/renderer-process 30.46.2 → 30.46.3

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.
@@ -2480,7 +2480,9 @@ const getInputMap = $Viewlet => {
2480
2480
  const $$Inputs = queryInputs($Viewlet);
2481
2481
  const inputMap = Object.create(null);
2482
2482
  for (const $Input of $$Inputs) {
2483
- inputMap[$Input.name] = $Input.value;
2483
+ if (!$Input.readOnly) {
2484
+ inputMap[$Input.name] = $Input.value;
2485
+ }
2484
2486
  }
2485
2487
  return inputMap;
2486
2488
  };
@@ -2509,6 +2511,9 @@ const restoreFocusedElement = ($Hidden, $New, focused) => {
2509
2511
  if (!$NewFocused) {
2510
2512
  return;
2511
2513
  }
2514
+ if ($NewFocused.readOnly) {
2515
+ return;
2516
+ }
2512
2517
  const $Previous = $Hidden.firstChild;
2513
2518
  if (!$Previous) {
2514
2519
  return;
@@ -2526,7 +2531,9 @@ const renderWithUid = ($Viewlet, dom, eventMap, uid, inputMap, focused, activeEl
2526
2531
  setComponentUid($New, uid);
2527
2532
  const $$NewInputs = queryInputs($New);
2528
2533
  for (const $Input of $$NewInputs) {
2529
- $Input.value = inputMap[$Input.name] || $Input.value || '';
2534
+ if (!$Input.readOnly) {
2535
+ $Input.value = inputMap[$Input.name] || $Input.value || '';
2536
+ }
2530
2537
  }
2531
2538
  $Viewlet.replaceWith($New);
2532
2539
  if (focused) {
@@ -1916,7 +1916,9 @@ const getInputMap = $Viewlet => {
1916
1916
  const $$Inputs = queryInputs($Viewlet);
1917
1917
  const inputMap = Object.create(null);
1918
1918
  for (const $Input of $$Inputs) {
1919
- inputMap[$Input.name] = $Input.value;
1919
+ if (!$Input.readOnly) {
1920
+ inputMap[$Input.name] = $Input.value;
1921
+ }
1920
1922
  }
1921
1923
  return inputMap;
1922
1924
  };
@@ -1945,6 +1947,9 @@ const restoreFocusedElement = ($Hidden, $New, focused) => {
1945
1947
  if (!$NewFocused) {
1946
1948
  return;
1947
1949
  }
1950
+ if ($NewFocused.readOnly) {
1951
+ return;
1952
+ }
1948
1953
  const $Previous = $Hidden.firstChild;
1949
1954
  if (!$Previous) {
1950
1955
  return;
@@ -1962,7 +1967,9 @@ const renderWithUid = ($Viewlet, dom, eventMap, uid, inputMap, focused, activeEl
1962
1967
  setComponentUid($New, uid);
1963
1968
  const $$NewInputs = queryInputs($New);
1964
1969
  for (const $Input of $$NewInputs) {
1965
- $Input.value = inputMap[$Input.name] || $Input.value || '';
1970
+ if (!$Input.readOnly) {
1971
+ $Input.value = inputMap[$Input.name] || $Input.value || '';
1972
+ }
1966
1973
  }
1967
1974
  $Viewlet.replaceWith($New);
1968
1975
  if (focused) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.46.2",
3
+ "version": "30.46.3",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"