@lvce-editor/renderer-process 30.46.1 → 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1970
|
+
if (!$Input.readOnly) {
|
|
1971
|
+
$Input.value = inputMap[$Input.name] || $Input.value || '';
|
|
1972
|
+
}
|
|
1966
1973
|
}
|
|
1967
1974
|
$Viewlet.replaceWith($New);
|
|
1968
1975
|
if (focused) {
|
|
@@ -8991,7 +8998,7 @@ const addMenu = ($$Menus, change, uid) => {
|
|
|
8991
8998
|
const dom = change[2];
|
|
8992
8999
|
const $Menu = create$Menu();
|
|
8993
9000
|
set$8($Menu, uid);
|
|
8994
|
-
$Menu.
|
|
9001
|
+
$Menu.onmousemove = handleMenuMouseOver;
|
|
8995
9002
|
$Menu.onclick = handleMenuClick;
|
|
8996
9003
|
const {
|
|
8997
9004
|
focusedIndex,
|
|
@@ -9035,7 +9042,8 @@ const updateMenu = ($$Menus, change) => {
|
|
|
9035
9042
|
const $Menu = $$Menus[level];
|
|
9036
9043
|
setBounds$a($Menu, x, y, width, height);
|
|
9037
9044
|
renderInto($Menu, dom);
|
|
9038
|
-
|
|
9045
|
+
const isOpeningSubMenu = $$Menus.length < newLength;
|
|
9046
|
+
if (level === newLength - 1 || isOpeningSubMenu) {
|
|
9039
9047
|
if (focusedIndex === -1) {
|
|
9040
9048
|
$Menu.focus();
|
|
9041
9049
|
} else {
|