mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-12-03 02:28:58 +03:00
On the US macOS layout Option+S produces `ß`. The guard from #14866 skips every Alt shortcut whose key is a non-ASCII character, so the page/edgeless switch never fired there. The event cannot tell a US user pressing Option+S for the shortcut from a Polish user typing `ś` with the same keys, so this keys the guard on the target instead: when the event targets an editable element (input, textarea, contenteditable) the character is text input and the shortcut is skipped, as in #14866; anywhere else there is nothing to type and the shortcut runs. Note: in page mode the doc root is contenteditable, so with the caret in the doc Option+S still types `ß`; the shortcut works when focus is outside text (edgeless canvas, header, sidebar). Fixing it inside text would mean dropping #14866's protection or changing the binding. fix #15232 Co-authored-by: DarkSky <darksky2048@gmail.com>