Cykelero / table-of-contents

See the list of a webpage's headings, and jump to any
MIT License
14 stars 0 forks source link

Ctrl+G shortcut triggered with other modifiers #2

Open ccMick opened 2 weeks ago

ccMick commented 2 weeks ago

The extension popover is being erroneously invoked.

I have another keyboard shortcut in Safari—Ctrl Opt Cmd G—which I use to group all my windows into one (WindowMerge All Windows). The Ctrl G shortcut for Table of Contents seems to steal that keystroke, despite me pressing other modifiers.

Note that I’m running Safari 18.0 (20619.1.26.11.3) on macOS 15.1 Sequoia.

Cykelero commented 2 weeks ago

Oh, that's strange: the shortcut capture is actually handled by Safari itself. The shortcut is declared in the extension's manifest, and Safari handles the actual capture.

Since this is a Safari bug, you could file it in Feedback Assistant. That might help!

Until Apple fixes this, maybe it's be possible to reimplement shortcut detection in the extension JS, but I expect that'd make it less reliable. (it'd require focus to be within the Web view, for instance)

ccMick commented 2 weeks ago

Ah, good to know. Thanks!