Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control-W ("backward-delete-word") in text fields breaks sporadically #158

Open
ppaeps opened this issue Dec 21, 2015 · 5 comments
Open

Comments

@ppaeps
Copy link

ppaeps commented Dec 21, 2015

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! :)

@jace
Copy link
Member

jace commented Dec 22, 2015

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.

@jace jace closed this as completed in 9c049d2 Apr 6, 2020
@ppaeps
Copy link
Author

ppaeps commented Apr 7, 2020

Hah. Thank you!

@jace
Copy link
Member

jace commented May 2, 2020

Alas, not fixed. That commit referred to hasgeek/lastuser#158 (we merged repositories).

@jace jace reopened this May 2, 2020
@jace
Copy link
Member

jace commented May 2, 2020

This issue is likely to remain unresolved until CodeMirror 6 becomes available, or we switch to ProseMirror.

@jace
Copy link
Member

jace commented Apr 27, 2021

CodeMirror 6 is now stable for use, and we'll switch whenever we can catch our breath from pressing issues.

@jace jace closed this as completed Apr 27, 2021
@jace jace reopened this Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants