-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignoring contentEditable containers like TinyMCE
- Loading branch information
Yannick Weiss
committed
Oct 24, 2018
1 parent
5b7af7b
commit 5548e52
Showing
6 changed files
with
195 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Safari Backspace | ||
|
||
Because macOS Mojave removed the Backspace. | ||
|
||
## The injected script | ||
```javascript | ||
function handleBackspace(e) { | ||
if (e.keyCode === 8 && !e.ctrlKey && !e.shiftKey | ||
&& e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' | ||
&& e.target.contentEditable !== 'true' // TinyMCE | ||
) { | ||
e.preventDefault(); | ||
window.history.go(-1); | ||
} | ||
} | ||
window.addEventListener('keydown', handleBackspace, false); | ||
|
||
``` | ||
|
||
## Paranoid People 🙈 | ||
I am recording your text inputs and send it to my servers, so I can laugh about your spelling mistakes. | ||
|
||
You can find the scripts in the release by inspecting the package contents. | ||
|
||
`open Safari\ Backspace.app/Contents/PlugIns/Backspace.appex/Contents/Resources/` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters