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

Mouse click or pressing 'End' at end of line with spaces #9

Open
jonathanong opened this issue Mar 13, 2014 · 3 comments
Open

Mouse click or pressing 'End' at end of line with spaces #9

jonathanong opened this issue Mar 13, 2014 · 3 comments

Comments

@jonathanong
Copy link
Contributor

just gonna list some bugs. these are super edge-cases and are still better than what we had before.

screen shot 2014-03-13 at 2 55 56 pm

screen shot 2014-03-13 at 2 56 39 pm

screen shot 2014-03-13 at 2 58 12 pm

@dandv
Copy link
Member

dandv commented Mar 14, 2014

Looks like they're all created by clicking or keyboarding beyond the "end" of a line (i.e. a line that ends with whitespace):

  • pressing End on such a line
  • touch-dragging past the visual non-space end of the line
  • pressing down arrow from the line above

I couldn't reproduce it by using the left/arrow keys to arrive at the same position. So all three screenshots represent the same bug. Or did you get that result somehow else?

@jonathanong
Copy link
Contributor Author

hmm maybe. i'm not even sure how i got there. i just continuously click until i find something that's off. i'll be sure to jot down the "how" next time.

@dandv dandv changed the title bugs Mouse click or pressing 'End' at end of line with spaces Mar 17, 2014
@dandv
Copy link
Member

dandv commented May 24, 2017

Three years later, I've looked into reproducing this again, and indeed, the behavior doesn't happen on left/right arrow navigation.

Right now the position parameter to getCaretCoordinates() is simply an index into the string which we take from selectionEnd (selectionStart isn't any better), and the library isn't aware of keyboard or mouse input.

IMO the fact that selectionStart/End don't match the displayed caret position when the caret is placed there in certain ways, is a (cross-)browser bug. I've filed the bug with Chrome.

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