I'm starting to really dislike #contenteditable
👴 "Where's the caret?"
💻 "Right here! And also over there."
I'm starting to really dislike #contenteditable
👴 "Where's the caret?"
💻 "Right here! And also over there."
Still annoyed at #contenteditable
> ContentEditable was first implemented in Internet Explorer 5.5 back in 2000. 5 years later it was reverse-engineered by Anne van Kesteren and around the year 2007 it was implemented in all major engines. In each and every single one of them differently.
https://medium.com/content-uneditable/fixing-contenteditable-1a9a5073c35d
The thing that's really annoying me these days is this #contenteditable problem (from 2012!):
> The final gotcha in this approach, which is what makes this technique imprecise, is that a collapsed DOM range may not map to a unique (*x*, *y*) position on the screen. This happens when the cursor is at the beginning or end of a line.
This problem has lasted longer than that web page, which is why I've had to link to the archive version!
> This is significant because if the cursor were at the end of the first line, then hitting the up arrow should navigate into the previous task while hitting the down arrow should move the cursor to the end of the second line of the task.
And that's the crux of my problem. How do I know if the flashing bar caret is at the end of one wrapped line or the beginning of the next wrapped line?
The browser knows. It's flashing that caret at me, taunting me. Why won't it tell me? #contenteditable