SidneyNemzer / snippets

A Chrome extension that allows you to create and edit JavaScript code snippets, which are synced to all your computers
https://chrome.google.com/webstore/detail/snippets/fakjeijchchmicjllnabpdkclfkpbiag
63 stars 9 forks source link

Save shortcut conflicts with Chrome's 'save this webpage' shortcut #8

Closed SidneyNemzer closed 7 years ago

SidneyNemzer commented 7 years ago

As the title says, the Ctrl + S is used by Chrome to save the current webpage to your computer. (On Windows, at least. Mac should be OK).

If the Devtools window with Snippets is docked to the webpage, every time you save the snippet, you'll also be prompted to save the page.

The quick-fix to this is to undock the Devtools window.

The long-term solution might be to disable manual saving, and only allow auto-saving (like Mozilla's Thimble editor)

SidneyNemzer commented 7 years ago

Another solution (maybe): event.preventDefault()

"Maybe" because I'm not SURE you can cancel this event.