web: finish modal focus handling and two real fixes it exposed
- the attention sheet is managed imperatively, so closing it now tells the controller; without that it stayed on the stack and left the app root inert, which silently swallowed every real click (found by the suite: the Settings Templates card stopped working after the sheet had been used); - the sheet returns focus to the bell after the repaint that replaces it; - opening a chat row's menu at the bottom edge now scrolls the row into view, not just flips the panel, so the items are actually reachable.
This commit is contained in:
@@ -243,8 +243,13 @@ function closeAttentionSheet({ restoreFocus = true } = {}) {
|
||||
if (!state.attentionSheetOpen) return;
|
||||
state.attentionSheetOpen = false;
|
||||
state.attentionSnapshot = null;
|
||||
if (!restoreFocus) modal.close("attention-sheet", { restoreFocus: false });
|
||||
// The sheet is managed imperatively (renderManaged: false), so the controller
|
||||
// must be told it closed; otherwise it stays on the stack and the app root is
|
||||
// left inert, which silently swallows every real click. Focus moves after the
|
||||
// repaint, since the close re-renders the surface the trigger lives in.
|
||||
modal.close("attention-sheet", { restoreFocus: false });
|
||||
render();
|
||||
if (restoreFocus) document.getElementById("attentionBell")?.focus();
|
||||
}
|
||||
|
||||
/** Dismiss one or more entries for good, persisting the identity set. */
|
||||
|
||||
Reference in New Issue
Block a user