Closed
Bug 1252108
Opened 9 years ago
Closed 4 years ago
Contenteditable span loses caret on right-arrow to end
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1248186
People
(Reporter: cmstlist, Unassigned)
Details
(Whiteboard: btpp-followup-2016-03-03)
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822
Steps to reproduce:
I created a page containing a paragraph with non-editable content before and after a content editable span. Minimal example:
<p>...<span contenteditable=true>Spantext</span>...</p>
JS fiddle: https://jsfiddle.net/rvgcfpeb/
I ran this in the browser, clicked in the Spantext word and used the arrow keys to navigate around.
Actual results:
When the caret was in the second-last position (between x, t), pressing the right arrow caused the caret to vanish and lose focus on the box. I could no longer type in the box or navigate into the word with any arrow key.
This seems to specifically happen when a content editable element is followed by any other text or text-containing node. In Chrome I do not experience this issue: I am able to right-arrow to the end of the word, and the caret makes it all the way there, and then I can left-arrow back to the start.
Expected results:
I expected the caret to end up at the end of the span after pressing right-arrow from the next-to-final position. I expected I would have then been able to navigate back to the left again.
Updated•9 years ago
|
Whiteboard: btpp-followup-2016-03-03
OK so I can add one more thing here...
In the process of implementing contentEditable on my project site I started adding some CSS styling and suddenly the bug went away. It turns out that if you add even one single pixel of padding or border, Firefox no longer removes the caret at the end of the span. It's more than just a pure visual bug though: With padding and/or border, it is possible to get from the start to the end of the span and back using only arrow keys. With neither padding nor border, the caret vanishes and the left arrow key is unable to move the caret anymore.
Illustrated here: https://jsfiddle.net/rvgcfpeb/2/
Yet another thing I noticed today... even with the border and/or padding sometimes the bug comes back, depending on - surprisingly - zoom factor.
Thanks man, just got the exact same issue and your solution works...
Posted two years ago and not a single reaction from Mozilla... Firefox is really continuing his descent to hell...
> Yet another thing I noticed today... even with the border and/or padding
> sometimes the bug comes back, depending on - surprisingly - zoom factor.
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Attachment #9176467 -
Attachment description: editable.html → testcase
Updated•4 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 5•4 years ago
|
||
Bah, I should've looked for duplicates.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•