Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Windows: PageUp/PageDown collapses selection only #6811

Open
redmunds opened this issue Feb 9, 2014 · 7 comments
Open

Windows: PageUp/PageDown collapses selection only #6811

redmunds opened this issue Feb 9, 2014 · 7 comments

Comments

@redmunds
Copy link
Contributor

redmunds commented Feb 9, 2014

This was introduced with CodeMIrror update for Sprint 36: #6268

Recipe:

  1. Select text in page
  2. Hit PageDown

Result:
Text is deselected. Cursor is placed after text that was selected. Editor is not scrolled.

Expected:
Editor is scrolled in addition to Results above

Workaround
Hit PageDown again.

@RaymondLim
Copy link
Contributor

@redmunds This is by design in CM. The first key stroke deselects the selection and navigation keys take effect only if there is no selection. You can see this behavior with Down/Up arrow keys as well, not just with PageUp/PageDown. On Mac the equivalent keys for PageUp/PageDown are fn-Up/Down arrow keys on laptop keyboard.

@redmunds
Copy link
Contributor Author

@RaymondLim Was there an announcement explaining why this was recently changed? I've never noticed this behavior in any other editor.

@RaymondLim
Copy link
Contributor

@redmunds No announcement that I'm aware of. I reviewed all of the changes in CM and Marijn put a note regarding his decision in either one of the commits or the issues that he fixed. I'll put a link here if I can easily find it again.

Found it! codemirror/codemirror5#2042

@peterflynn
Copy link
Member

@RaymondLim It's not something I ever hit personally, but this does seem odd to me -- it's not the behavior in Sublime, WebStorm, Notepad++, or Notepad (or even Word, for that matter). Are there Mac editors that behave this way?

@RaymondLim
Copy link
Contributor

@redmunds and @peterflynn I totally agree with you that it's odd. But Marijn's codemirror/codemirror5#2042 (comment) claims that some do.

@peterflynn
Copy link
Member

It sounds like he's saying that only (some) Linux editors do -- not any on any other platform. That's not particularly helpful for us given that ~90% of our users aren't on Linux...

@njx
Copy link
Contributor

njx commented Feb 10, 2014

Medium priority to @RaymondLim. I think we should push back on this change in CodeMirror - if it's literally the case that no other popular Windows or Mac editor works this way, we shouldn't change it just because some Linux editors do. Raymond, could you file a bug in CodeMirror, and maybe double-check a few popular editors in Mac and Win to back up our argument?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants