Don’t override browser keyboard shortcuts on OS X
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 187
- PR merge metrics
- No merged PRs in 30d
Description
In Firefox 28 on OS X, the [demo page](http://jaredly.github.io/treed/) swallows most keyboard shortcuts I try to use to control the browser. Any shortcut using a key that the demo uses is overridden, and interpreted as a command to the demo instead of to the browser, as if I had not held down Command. The most annoying overrides are ⌘L to focus the location bar and ⇧⌘{ and ⇧⌘} to switch tabs.
Where the code sets up keyboard shortcuts (probably [keys.js](https://github.com/jaredly/treed/blob/master/lib/keys.js) or [`attachListeners` in view.js](https://github.com/jaredly/treed/blob/ce7f68441b015af09b6f73a646ba85d964ae91cb/lib/view.js#L347-L357)), the state of the Command key should be checked when a keypress is detected. If Command is being held and the shortcut doesn’t require it, then the handler should not trap the keypress event.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/keys.js and the attachListeners code in lib/view.js around lines 347-357, where keyboard shortcuts are detected. Check how the Command key is handled for shortcuts that do not require it. Done means browser shortcuts such as ⌘L and ⇧⌘{ or ⇧⌘} are no longer swallowed by the demo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100