Caret ("cursor") disappears before span with set background-color in iframe in designmode (rich text editor)

ASSIGNED
Assigned to

Status

()

Core
Editor
--
major
ASSIGNED
7 years ago
3 months ago

People

(Reporter: Cacycle, Assigned: Michael)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug], URL)

Attachments

(2 attachments, 2 obsolete attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729)

The caret ("cursor") disappears when positioned from the left just before a span with set background-color style in iframes in designmode. This is a major problem in all existing rich text editors.

It only happens when moving the caret to the right, not when moving the caret to the left. It also happens only on the left side of the span. It does not happen when setting other styles such as color or border. It happens for all tested inline elements (<span>, <font>, <i>). It does not happen if the start of the span is at the beginning of a new line, e.g. after a <br> or for block level elements.


Reproducible: Always
(Reporter)

Comment 1

7 years ago
Created attachment 458195 [details]
Testcase
(Reporter)

Comment 2

7 years ago
Created attachment 458196 [details]
Testcase
Attachment #458195 - Attachment is obsolete: true
(Reporter)

Comment 3

7 years ago
Created attachment 458198 [details]
Testcase
Attachment #458196 - Attachment is obsolete: true
(Reporter)

Comment 4

7 years ago
A similar but maybe unrelated bug is described in 579763.
(Reporter)

Comment 5

7 years ago
A similar but maybe unrelated bug is described in bug 579763.

Comment 6

7 years ago
I can confirm this for FF 3.6.12 as well as today's nightly build of FF 4.0b8pre using Windows XP SP3.

Updated

7 years ago
Version: unspecified → Trunk

Updated

6 years ago
Component: General → General
Product: Firefox → Core
QA Contact: general → general

Updated

6 years ago
Component: General → Editor
QA Contact: general → editor

Comment 7

6 years ago
Changing the status to "New," as this is confirmed in the latest nightly build of Firefox on my end.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → ehsan
Whiteboard: [post-2.0]
Assignee: ehsan → nobody
See Also: → bug 579763
Whiteboard: [post-2.0]

Comment 8

3 years ago
str
Created attachment 8451457 [details]
missingTextCursorOnGoogleSpreadsheet.png

Here's a real world example:

1. Go to https://docs.google.com/spreadsheets/d/1-CERGJ75bZKrk73cWCqXtU2yBQYbNkSraymMW96efeo/edit?pli=1#gid=1950799756
2. Switch to the 'Abs. Numbers Monthly Summary' sheet
3. Select table cell B19
4. Click between the equal sign and the apostrophe inside the formula input field

Sebastian

Comment 9

2 years ago
str
Here's a simpler test case (using contenteditable):

data:text/html,<!DOCTYPE html><div contenteditable="true">a<span style="background:lightblue;">b</span></div>

Set the text cursor before the a and then move it one to the right.

=> The text cursor disappears.

Sebastian
OS: Windows XP → All
Hardware: x86 → All
Whiteboard: [good first bug]

Comment 10

2 years ago
Build identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0

Can confirm it's there in FF 38.0.1

Comment 11

2 years ago
Can I work on this? It's my first bug. I heard editor code can be a bit hairy. But I feel I can do it.
I think I didn't reply to this earlier. If so, sorry for that!
I assigned the bug to you now, Sreejith. Thank you for taking it over! Please let me know if I can be of any help!

Sebastian
Assignee: nobody → sreejith.r44

Comment 13

2 years ago
@Sebastian I'll start on this. Will let you know about updates.
(Reporter)

Comment 14

4 months ago
This bug is still present in 52.0.1 (Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0) and is still a problem. Sreejith: are you still on it? If not: anybody willing to work on this?
(Assignee)

Comment 15

4 months ago
If he's not, I'd like to take over.
As Sreejith never provided a patch and wasn't active anymore on Bugzilla after his comment above, I think it's fine if you take over this bug, Michael. Therefore I've assigned it to you.

Sebastian
Assignee: sreejith.r44 → michaeljohnyoder
Status: NEW → ASSIGNED

Comment 17

3 months ago
Another example is: <div contenteditable="true">&zwnj;<span style="background-color:antiquewhite;">qwer</span></div>
If you place the selection on the zwnj text node at offset 0 or 1, the caret will be invisible. Moving right/left works as expected.
You need to log in before you can comment on or make changes to this bug.