feat: restore legacy modal and drag behavior
This commit is contained in:
@@ -116,7 +116,10 @@
|
||||
takeOut.disabled = busy || !commandAvailable;
|
||||
backgroundNone.disabled = busy || playout.canChangeBackground !== true;
|
||||
backgroundFile.disabled = busy || playout.canChangeBackground !== true;
|
||||
fadeDuration.disabled = busy || playout.canChangeBackground !== true;
|
||||
// MainForm.Designer keeps panel3 (which owns ComboDi) invisible. Preserve
|
||||
// the native fade value as read-only state, but never expose an operator
|
||||
// interaction path from the WebView shell.
|
||||
fadeDuration.disabled = true;
|
||||
backgroundNone.checked = playout.backgroundEnabled !== true;
|
||||
backgroundName.value = playout.backgroundEnabled === true
|
||||
? (playout.backgroundFileName || "선택한 배경") : "배경없음";
|
||||
@@ -149,12 +152,17 @@
|
||||
backgroundNone.addEventListener("change", function () {
|
||||
post("toggle-background", {});
|
||||
});
|
||||
fadeDuration.addEventListener("change", function () {
|
||||
post("set-fade-duration", { duration: Number(fadeDuration.value) });
|
||||
});
|
||||
|
||||
document.addEventListener("keydown", function (event) {
|
||||
if (event.defaultPrevented || event.repeat || hasOpenDialog()) return;
|
||||
if (event.defaultPrevented) return;
|
||||
const legacyShortcut = event.key === "F2" || event.key === "F3" ||
|
||||
event.key === "F8" || event.key === "Escape";
|
||||
if (hasOpenDialog()) {
|
||||
// ShowDialog/MessageBox own these keys. Consume browser defaults (notably
|
||||
// Chromium's F3 Find Next) without invoking a MainForm playout shortcut.
|
||||
if (legacyShortcut) event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (event.repeat) return;
|
||||
if (event.key === "F2") {
|
||||
event.preventDefault();
|
||||
if (!backgroundFile.disabled) backgroundFile.click();
|
||||
|
||||
Reference in New Issue
Block a user