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

iOS Safari - cursor disappears sometimes #16

Open
mweiss opened this issue Apr 10, 2020 · 1 comment
Open

iOS Safari - cursor disappears sometimes #16

mweiss opened this issue Apr 10, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@mweiss
Copy link
Owner

mweiss commented Apr 10, 2020

Platform: iOS12 Safari

If you select the editor by tapping text, the caret sometimes doesn't appear on iOS. However, the keyboard is still available and text can be updated. I thought this might be an issue with contenteditable in general on iOS, but other contenteditable editors, like DraftJS and ProseMirror, do not have this issue.

The expected behavior is that the cursor is visible.

@mweiss mweiss added the bug Something isn't working label Apr 10, 2020
@mweiss mweiss changed the title iOS - cursor disappears sometimes, edits strangely buffered iOS - cursor disappears sometimes Apr 10, 2020
@mweiss mweiss changed the title iOS - cursor disappears sometimes iOS Safari - cursor disappears sometimes Apr 10, 2020
@mweiss
Copy link
Owner Author

mweiss commented Apr 10, 2020

I tracked this down to

.rte-hide-caret {
    caret-color: transparent;
}

It appears to be a bug in iOS safari, e.g. it does not update the value of the caret even if you update the style. Good news it's only an issue in the demo, so we can perhaps add a workaround for it. I've also logged a bug with Apple via their feedback assistant: https://feedbackassistant.apple.com/feedback/7659507

mweiss added a commit that referenced this issue Apr 10, 2020
* add css workaround to ignore hiding a caret on iOS

* fix whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant