Contenteditable Span lost style if last character is a whitespace

UNCONFIRMED
Unassigned

Status

()

Core
Editor
UNCONFIRMED
5 years ago
5 years ago

People

(Reporter: York Richter, Unassigned)

Tracking

({testcase})

Trunk
x86_64
Windows 8
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [dupeme])

Attachments

(1 attachment, 7 obsolete attachments)

(Reporter)

Description

5 years ago
Created attachment 780927 [details]
testcase.html

User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 (Beta/Release)
Build ID: 20130618114625

Steps to reproduce:

1. Load attached test case 
2. Set the courser direct after the red area "Test case 1"
3. Press 'a' 



Actual results:

The 'a' is outside the "red" <span>

But if you press SPACE, the whitespace inside the "red" <span>


Expected results:

The 'a' must be inside the "red" <span>. If the last <span> character is not a whitespace, the behavior is correct, see at "Test case 2"
(Reporter)

Comment 1

5 years ago
Comment on attachment 780927 [details]
testcase.html

<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">

<title>test case</title>

</head>
<body>
Test case 1:
<div id="edit" contenteditable="true">Hello <span style="font-weight: bold; background-color: red">World </span> a</div>
<br>
Test case 2:
<div id="edit" contenteditable="true">Hello <span style="font-weight: bold; background-color: red">World</span> a</div>
</body>
</html>
(Reporter)

Comment 2

5 years ago
Created attachment 780931 [details]
testcase.html
(Reporter)

Comment 3

5 years ago
Created attachment 780932 [details]
testcase.html
Attachment #780927 - Attachment is obsolete: true
Attachment #780931 - Attachment is obsolete: true
(Reporter)

Comment 4

5 years ago
Created attachment 780935 [details]
testcase.html
Attachment #780932 - Attachment is obsolete: true
(Reporter)

Comment 5

5 years ago
Created attachment 780936 [details]
test.html
(Reporter)

Comment 6

5 years ago
Created attachment 780938 [details]
testcase.html
Attachment #780935 - Attachment is obsolete: true
Attachment #780936 - Attachment is obsolete: true
(Reporter)

Updated

5 years ago
Attachment #780938 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 7

5 years ago
Comment on attachment 780938 [details]
testcase.html

<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">

<title>test case</title>

</head>
<body>
Test case 1:
<div id="edit" contenteditable="true">Hello <span style="font-weight: bold; background-color: red">World </span> .</div>
<br>
Test case 2:
<div id="edit" contenteditable="true">Hello <span style="font-weight: bold; background-color: red">World</span> .</div>
</body>
</html>
(Reporter)

Comment 8

5 years ago
Created attachment 780940 [details]
testcase.html
Attachment #780938 - Attachment is obsolete: true
(Reporter)

Updated

5 years ago
Attachment #780940 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 9

5 years ago
Created attachment 780941 [details]
test.html
Attachment #780940 - Attachment is obsolete: true
(Reporter)

Updated

5 years ago
Attachment #780941 - Attachment mime type: text/plain → text/html
(Reporter)

Comment 10

5 years ago
Sometimes both text cases are wrong or "test case 1" is correct and "test case 2" is wrong! Strange! 
No Problems with IE, Chrome and Safari

Updated

5 years ago
Component: Untriaged → Editor
Product: Firefox → Core
I can see the Issue even back using Firefox 3.0 (Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 ID:2010031422).

It also seems to make a difference if you use the mouse or the keyboard + tab through to set the cursor's focus next to the red div.
Keywords: testcase
Whiteboard: [dupeme]
Version: 17 Branch → Trunk
You need to log in before you can comment on or make changes to this bug.