xy: back closes the overlay, arrows walk the list #36
Loading…
Reference in a new issue
No description provided.
Delete branch "xy-overlay-back"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Android's PWA has no Escape key, so back is the only way out of a modal. xy pushed no history, so back closed the whole app instead of the open card.
Every overlay now registers with a stack that pushes a history entry on open. Back, Escape and the ✕/↩️ buttons funnel through one popstate, so nesting works: back closes выписки, then the card, then leaves the board. The 13 hand-rolled Escape handlers go with it.
← and → walk the open card's list, or its whole group, stopping at both ends and firing only when the caret is outside a field. Leaving a dirty card by any route now asks Сохранить / Не сохранять / Отмена instead of discarding in silence; saving continues to the next card.
Closes #27
Closes #24