-
Notifications
You must be signed in to change notification settings - Fork 152
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
Position#move isn't available on blank position #344
Comments
@rlivsey Yes, that's a good catch. Exiting early on no cursor sounds like the right move. I will address this soon, but happy to take a PR in the meantime. |
I'm looking at this and will fix it today |
bantic
added a commit
that referenced
this issue
Mar 24, 2016
It is possible for the editor's element to be focused but not have a cursor (selection). In this case, key events will fire on the editor's element but the editor will not be able to determine a logical `Position` (since there is no selection). When this happens, we abort handling the key event. fixes #344
bantic
added a commit
that referenced
this issue
Mar 24, 2016
It is possible for the editor's element to be focused but not have a cursor (selection). In this case, key events will fire on the editor's element but the editor will not be able to determine a logical `Position` (since there is no selection). When this happens, we abort handling the key event. fixes #344
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the editor handles a cursor key when the editor doesn't have focus, then
editor.cursor.offsets
returns a blank range, with blank position objects. These blank positions don't have amove
method and sadness occurs:Should we just put a guard checking that
this.cursor.hasCursor()
at the top ofhandleKeydown
?The text was updated successfully, but these errors were encountered: