fix(login): keep remember-password toggle interactive in draggable header
The login shell sets -webkit-app-region: drag on its frameless header, which captured clicks on the "记住密码" checkbox before v-model could update. Mark .options-row and its descendants as no-drag, and bind the checkbox via :checked + @change so the click reliably reaches the toggle handler. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,10 @@ function toggleMenu() {
|
|||||||
menuOpen.value = !menuOpen.value;
|
menuOpen.value = !menuOpen.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onRememberChange(event: Event) {
|
||||||
|
rememberPassword.value = (event.target as HTMLInputElement).checked;
|
||||||
|
}
|
||||||
|
|
||||||
function handleOutsideClick(event: MouseEvent) {
|
function handleOutsideClick(event: MouseEvent) {
|
||||||
if (!menuOpen.value) return;
|
if (!menuOpen.value) return;
|
||||||
const root = menuRef.value;
|
const root = menuRef.value;
|
||||||
@@ -125,7 +129,11 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
<div class="options-row">
|
<div class="options-row">
|
||||||
<label class="check-label">
|
<label class="check-label">
|
||||||
<input type="checkbox" v-model="rememberPassword" />
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
:checked="rememberPassword"
|
||||||
|
@change="onRememberChange"
|
||||||
|
/>
|
||||||
<span>记住密码</span>
|
<span>记住密码</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -198,7 +206,9 @@ onBeforeUnmount(() => {
|
|||||||
.login-shell input,
|
.login-shell input,
|
||||||
.login-shell button,
|
.login-shell button,
|
||||||
.login-shell a,
|
.login-shell a,
|
||||||
.login-shell label {
|
.login-shell label,
|
||||||
|
.login-shell .options-row,
|
||||||
|
.login-shell .options-row * {
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user