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

Bug: Text cursor indicator not following cursor #158

Closed
a11yHolli opened this issue Mar 4, 2021 · 15 comments
Closed

Bug: Text cursor indicator not following cursor #158

a11yHolli opened this issue Mar 4, 2021 · 15 comments

Comments

@a11yHolli
Copy link

OS: Windows 10
Browser: Chrome 88
AT: NVDA 2020.4, Text Cursor indicator

I have text cursor indicator turned on in windows and I noticed the indicator was not following the cursor when using up and down arrows to navigate between two paragraphs.

To turn on text cursor indicator:

  • Hit Windows Key
  • Type accessibility
  • Open the ease of access center
  • Navigate to "text cursor"
  • select the switch to "Turn on text cursor indicator"
  • adjust settings to make it easily to see, I attached a screenshot of mine

image

Test Steps
Write two paragraphs
Use the up arrow to navigate to the space between both paragraphs

Expected Results
The cursor indicator should follow the cursor

Actual Results
the cursor indicator stays in place and the cursor moves to the space between the paragraphs

Notes

  • hitting the up arrow a second time will rejoin the cursor with the cursor indicator
  • I noticed this is also an issue in github's text editor so it may be browser or OS related.

Screenshot
I couldn't find a way to actually screenshot the cursor so the red line shows where the cursor was when I took the screenshot.
image

@trueadm
Copy link
Collaborator

trueadm commented Mar 4, 2021

Thanks for reporting this :)

our if curiosity, does this happen on FB with Draft? Also does it happen on other editors like Gmail or Quip?

I wonder if this is an OS bug (maybe it works better with Edge?).

@a11yHolli
Copy link
Author

@trueadm I use the text cursor indicator all the time and I have never noticed this before. It's really obvious when it happens because you aren't sure where your typing will happen. But I will check in a few other places and see if I can make it happen.

@a11yHolli
Copy link
Author

a11yHolli commented Mar 4, 2021

@trueadm Quick tests

  • Facebook : no
  • Quip : no
  • Gmail : yes
  • Google Docs : doesn't actually show my cursor indicator

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

So I just tried on the Outline Playground on Github (the one you run locally) on my personal Windows machine. The text cursor seems to appear and work correctly. I'll see if I can get my Windows laptop working and see if it's maybe related to the CSS on the Outline Playground on intern.

@yangshun
Copy link
Contributor

yangshun commented Mar 5, 2021

I'll see if I can get my Windows laptop working and see if it's maybe related to the CSS on the Outline Playground on intern.

I use Windows as a work laptop and can't repro this issue on the Outline Playground on intern.

Outline.Playground.-.Google.Chrome.2021-03-05.08-45-27.mp4

P.S. The indicator isn't captured in the video but it matches the cursor position.

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

I can repro in plain text mode, but this doesn't happen in rich text mode. I also have to be at the end of the text (cursor at the end) for it to happen to.

@yangshun
Copy link
Contributor

yangshun commented Mar 5, 2021

Right, I can reproduce in plain text mode too.

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

My hunch is that this is because we use \n character rather than <br>.

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

I think the simplest and probably most logical solution here is to come up with a LinkBreakNode that extends TextNode. Its value would be \n so text content continues to work properly, with the exception of having a custom createDOM that renders a br element. Thoughts on that @yangshun?

@yangshun
Copy link
Contributor

yangshun commented Mar 5, 2021

Sounds reasonable but I wouldn't say I know enough about Outline to be sure. I'm not exactly sure why we need Outline for plaintext mode though. Wouldn't a <textarea> do the same?

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

@yangshun its not really full plain text. It still has custom emojis, mentions, text delights, hashtags etc

@yangshun
Copy link
Contributor

yangshun commented Mar 5, 2021

Thanks that's helpful :)

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

Fixed in #160.

@trueadm trueadm closed this as completed Mar 5, 2021
@a11yHolli
Copy link
Author

@trueadm I found another example of this while testing emojii. Is this separate? should I open a separate issue for it?

cursor.indicator.misalignment.mp4

@trueadm
Copy link
Collaborator

trueadm commented Mar 5, 2021

@a11yHolli Yeah it looks related. A fix for that has gone up, it should be live in the next few hours. Let's see if that fixes this problem.

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

3 participants