Open Bug 1175495 Opened 9 years ago Updated 2 years ago

HTML5 Contenteditable: cursor becomes invisible at left of img inside link

Categories

(Core :: DOM: Editor, defect)

19 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: david, Unassigned)

References

Details

(Keywords: reproducible)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150511103303

Steps to reproduce:

1. Enter location: data:text/html,<h1 contenteditable><a href='%23'>x<img src='%23'>y</a></h1>

2. Click after the img.

3. Cursor leftwards over the img node towards the start.

Alternatively, move the cursor programmatically to the same position offset 1 of the <a> element. 


Actual results:

The cursor disappears.

However everything else works correctly:

1. document.getSelection() shows the expected position, that is, offset 1 of the <a> element.
2. Typing/cursoring behaves normally (and makes the cursor reappear).

Cursoring rightwards over the img node does not cause the cursor to disappear.


Expected results:

The cursor should be visible, exactly as it is when the cursor position is the last offset of the text node before the img node.
Component: Untriaged → Editor
Product: Firefox → Core
Flags: needinfo?(ehsan)
@Roan Kattouw:
Needinfo for what information?
Flags: needinfo?(roan.kattouw)
@david:
I haven't a clue what we are talking about. "Enter location" means copy / paste that string "data:text/html,<h1 contenteditable><a href='%23'>x<img src='%23'>y</a></h1>" to FF Location bar like an URL and then proceed in the appearing page?
Flags: needinfo?(david)
@RainerBielefeldNG: exactly.

BTW I can reproduce on the latest nightly, i.e. https://ftp.mozilla.org/pub/firefox/nightly/2016/02/2016-02-21-03-03-40-mozilla-central/firefox-47.0a1.en-US.linux-x86_64.tar.bz2 .
Flags: needinfo?(david)
Effect os REPRODUCIBLE with unofficial (from <http://seamonkey.callek.net/contrib/>)  en-US SeaMonkey 2.44a1  Mozilla/5.0 (Windows NT 6.1; x64; rv:47.0)  Gecko/20100101 Firefox/47.0 Build 20160208090255  (Default Classic Theme)  on German WIN7 64bit:
0. Launch Browser
1. 'Copy-Paste 
   "data:text/html,<h1 contenteditable><a href='%23'>x<img src='%23'>y</a></h1>"
   to location bar → <Enter>
   » A Heading "x|picture|y" appears
2. Click left from "x"
   » Caret flashes left form "x"
3. Keyboard: <arrowright> key several times:
   » Each key press will move flashing caret 1 character position to the right
     until caret flashes right from "y"
4. Keyboard: <arrowleft> key several times:
   » first key press will move flashing caret 1 character position to the right
   bug (?): after second key pres caret vanishes
   » After third key press caret reappears left from "x"

a) But my knowledge is too poor to decide whether this is a real bug or caused 
   by erroneous syntax
b) Also REPRODUCIBLE with  English SeaMonkey 2.44a1  (X11; Linux x86_64; rv:47.0)
   Gecko/20100101 Firefox/47.0 Build 20160208023510   (Default Classic Theme) 
   on VirtualBox Ubuntu 14.04 LTS
Flags: needinfo?(roan.kattouw)
Flags: needinfo?(ehsan)
Keywords: reproducible
OS: Unspecified → All
Hardware: Unspecified → All
Summary: Contenteditable: cursor disappears at left of img inside link → HTML5 Contenteditable: cursor disappears at left of img inside link
c) Already REPRODUCIBLE with  en-US  SeaMonkey 2.16.2  (Windows NT 6.1; WOW64;
   rv:19.0)  Gecko/20100101 Firefox/rv:19.0  Build 20130310201055  (Classic Theme)
   on German WIN7 64bit
   (probably even before)
d) more editing experiments show that the caret is at it's place, but it's 
   invisible.
Summary: HTML5 Contenteditable: cursor disappears at left of img inside link → HTML5 Contenteditable: cursor becomes invisible at left of img inside link
Version: 38 Branch → 19 Branch

I still see exactly the same behaviour as above, using: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.