mweiss / elm-rte-toolkit

A toolkit for creating rich text editors in Elm
https://mweiss.github.io/elm-rte-toolkit/
BSD 3-Clause "New" or "Revised" License
149 stars 14 forks source link

iOS Safari - cursor disappears sometimes #16

Open mweiss opened 4 years ago

mweiss commented 4 years ago

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 commented 4 years ago

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