Pause mobile WOL rerenders while selecting
This commit is contained in:
1 parent
107c6d423c
commit
06d12ecdea
1 file changed
+5
-5
@@ -2411,13 +2411,13 @@ function hasOpenWolPicker() {{
|
|||||||
return false;
|
return false;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
function activeWolPasswordField() {{
|
function activeWolInteractiveField() {{
|
||||||
const active = document.activeElement;
|
const active = document.activeElement;
|
||||||
return active && typeof active.matches === 'function' && active.matches('[data-wol-password]') ? active : null;
|
return active && typeof active.matches === 'function' && active.matches('[data-wol-password],[data-wol-select]') ? active : null;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
function shouldDeferRouterRender() {{
|
function shouldDeferRouterRender() {{
|
||||||
return hasOpenWolPicker() || Boolean(activeWolPasswordField());
|
return hasOpenWolPicker() || Boolean(activeWolInteractiveField());
|
||||||
}}
|
}}
|
||||||
|
|
||||||
function clearPendingWolBlurFlush() {{
|
function clearPendingWolBlurFlush() {{
|
||||||
@@ -4023,12 +4023,12 @@ cards.addEventListener('change', (ev) => {{
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
cards.addEventListener('focusin', (ev) => {{
|
cards.addEventListener('focusin', (ev) => {{
|
||||||
if (!ev.target?.matches?.('[data-wol-password]')) return;
|
if (!ev.target?.matches?.('[data-wol-password],[data-wol-select]')) return;
|
||||||
clearPendingWolBlurFlush();
|
clearPendingWolBlurFlush();
|
||||||
}});
|
}});
|
||||||
|
|
||||||
cards.addEventListener('focusout', (ev) => {{
|
cards.addEventListener('focusout', (ev) => {{
|
||||||
if (!ev.target?.matches?.('[data-wol-password]')) return;
|
if (!ev.target?.matches?.('[data-wol-password],[data-wol-select]')) return;
|
||||||
scheduleWolBlurFlush();
|
scheduleWolBlurFlush();
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user