-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Editor: Home/End (and cmd-a/cmd-e) move to end of paragraph, not line #8775
Comments
I've tested on macOS and the behaviour is correct (i.e. matches OS behaviour): Ctrl+a: jump to beginning of paragraph I haven't tested Windows yet but looking at the default CodeMirror keymap they've set |
Testing Windows in a VM I'm seeing the following behaviour: Edge textarea: Edge CodeMirror (Ghost's underlying editing canvas): I haven't been able to test properly with arrow keys as I think my VM host may be interpreting keyboard shortcuts from macOS and I can't find a way to send arrow key events directly as is possible with |
I agree with @pokrface. In Chrome on Windows 10 and in the Windows 10 app, Home and End don't work as expected. They take you to the beginning/end of the paragraph, instead of the beginning/end of the line. It's quite awkward - I didn't realise how much I use home and end until now! :) Edit: just to be clear - I mean this only happens in the Ghost editor. Please can you fix it? |
I took a whack at it in this PR, using the extraKeys option in CodeMirror. There might be a more elegant way to do it, but not that I could see. |
closes TryGhost/Ghost#8775 - upgrades our SimpleMDE fork - [bumps CodeMirror version to 5.30.0](kevinansfield/simplemde-markdown-editor@b3e9f8b) - [fixes Home/End key behaviour on Windows](kevinansfield/simplemde-markdown-editor@f2e9818)
closes TryGhost/Ghost#8775 - upgrades our SimpleMDE fork - [bumps CodeMirror version to 5.30.0](kevinansfield/simplemde-markdown-editor@b3e9f8b) - [fixes Home/End key behaviour on Windows](kevinansfield/simplemde-markdown-editor@f2e9818)
Thank you, @jamesvhays! |
Issue Summary
When using the editor to write a post, the home and end keys on Win10 and the equivalent cmd-a/cmd-e commands on macos position the cursor at the beginning and end of the current paragraph being edited, rather than the beginning and end of the current line.
Steps to Reproduce
Expected behavior is that the cursor would move to the beginning or end of the current line being edited. Pre-1.0 Ghost behaved correctly (and so does this GitHub text entry form). Current behavior subverts expected behavior of home/end and has made composing long posts in the editor more difficult.
Technical details:
Verified problem behavior with:
Firefox 54.0.1 / MacOS 10.12.5
Chrome 60.0.3112.78 / MacOS 10.12.5
Chrome 60.0.3112.78 / Windows 10 v1607 (build 14393.1198)
Edge 38.14393.1066.0 / Windows 10 v1607 (build 14393.1198)
The text was updated successfully, but these errors were encountered: