Control-W ("backward-delete-word") in text fields breaks sporadically
Test environment
Safari version 9.0.1 (11601.2.7.2) on Mac OS X version. 10.11.1 (15B42).
Note that the default keybindings on MacOS X are buggy. You need to have the following in your ~/Library/KeyBindings/DefaultKeyBinding.dict file:
{
"^w" = "deleteWordBackward:";
}
Test case
Start typing a comment on e.g. https://rootconf.talkfunnel.com/2016/2-dnssec-workshop
Type the words: "This is a test comment. I wonder if I can delete all the words."
Now type control-W control-W control-W
Expected behaviour
Only "This is a test comment. I wonder if I can delete all" should remain in the text field.
Actual behaviour
The string "This is a test comment. I wonder if I can delete all the wo" remains in the text field. Switching back and forth between browser tabs breaks control-W altogether. Other keyboard shortcuts (control-A, control-E, control-U and control-K) seem unaffected. Only control-W is broken.
I have not tested this on other platforms. But deleting words backwards with control-W works in every other text box I have encountered. Including the one in which I'm typing this very bug report! :)
The text widget is CodeMirror, which simulates a textarea field. It has its own key bindings. We should add ^W and other common Emacs keybindings there as many people will expect them to just work.
Unfortunately there is no way (that I know of) to access Cocoa bindings from the browser environment for cases where the user has custom settings.
Hah. Thank you!
Alas, not fixed. That commit referred to hasgeek/lastuser#158 (we merged repositories).
This issue is likely to remain unresolved until CodeMirror 6 becomes available, or we switch to ProseMirror.
CodeMirror 6 is now stable for use, and we'll switch whenever we can catch our breath from pressing issues.