fix popup cmd a select all for #1395#1396
fix popup cmd a select all for #1395#1396Chapoly1305 wants to merge 2 commits intowindingwind:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes missing popup textarea keyboard shortcut handling so Cmd/Ctrl+A/C/X work again in the reader selection popup (regression from refactor), while also making concat-modifier tracking reflect the actual modifier-pressed state.
Changes:
- Re-attaches the popup textarea
keydownhandler viagetOnTextAreaCopy(...)so select-all/copy/cut shortcuts run. - Refactors concat-modifier tracking to use
ev.metaKey/ev.ctrlKeystate rather than only reacting to modifier keydown. - Minor inline handler tweak in
standalone.xhtml(window.close()).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/modules/shortcuts.ts |
Tracks concat modifier using metaKey/ctrlKey state on keydown/keyup. |
src/modules/popup.ts |
Wires keydown listener for popup textarea to restore Cmd/Ctrl+A/C/X behavior. |
addon/chrome/content/standalone.xhtml |
Small inline handler change for close command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@Chapoly1305 npm run lintand push the results? Thanks! |
556e444 to
d2b5c22
Compare
|
@Chapoly1305 npm run lintand push the results? Thanks! |
|
@Chapoly1305 npm run lintand push the results? Thanks! |
|
Test passed on MacOS,
|
Root cause was missing event wiring: the popup textarea’s keydown handler (getOnTextAreaCopy) was no longer attached after refactor, so Cmd/Ctrl+A logic in that handler never ran. metaKey detection itself was fine; it just wasn’t being invoked in the popup textarea. getOnTextAreaCopy(...) centralizes Cmd/Ctrl+A/C/X behavior in one place.
It avoids duplicating shortcut logic across multiple inline listeners.
Test results: now user able to use select all in the pop-up, as well as copy, cut, etc. Concat feature works as before, not affected by this fix.