Opened 14 years ago

Last modified 11 years ago

#5841 confirmed Bug

:first-letter style causes character position translation errors and hanging in Google Chrome

Reported by: Ihar Bury Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.0
Keywords: Webkit VendorFix Cc:


In Google Chrome 5.0.375.70 (Windows 7) adding :first-letter style to content.css leads to incorect editor behavior.

If you set cursor to any position inside an existing paragraph and press a character, the character is inserted not in the cursor position but at the previous position.

If you try to set cursor at the beginning of an existing paragraph, it's set after the first letter instead. If you try to press backwards key to move the cursor via keyboard, the script hangs.

In IE 8 that works fine.

Change History (6)

comment:1 Changed 14 years ago by Foliovision

Cc: programming@… added
Keywords: css first-letter first-line added
Version: 3.4

Same problem in Safari (4.0.5 on Mac OS X).

It's :first-letter and also :first-line (in our CSS, we use p:first-child:first-letter and p:first-child:first-line).

Here's the test site with our CSS:

Just open it try to start writing. If it stops after first letter, switch to source, add some more text and switch back to WYSIWYG to continue editing. You will see the weird behavior.

and try to change the first line which appears. Try to type in before and after the first letter. It also crashes my browser occasionally.

Here's the CSS file:

comment:2 Changed 14 years ago by Foliovision

Cc: programming@… removed

comment:3 Changed 14 years ago by Krzysztof Studnik

Component: GeneralCore : Styles
Keywords: css first-letter first-line removed
Status: newconfirmed

Confirmed for Chrome 7 and CKE 3.4.1

comment:4 Changed 11 years ago by Thierry G.

Version: (GitHub - master)

Any news since two years ? The problem is still present in CKeditor 4 with HTML5 inline editing.

comment:5 Changed 11 years ago by Jakub Ś

Keywords: Webkit VendorFix added
Version: 4.0.2 (GitHub - master)3.0

Yes, there is an update. Try below code in Chrome or Safari.

<!DOCTYPE html>
	<title>Replace Textarea by Code &mdash; CKEditor Sample</title>
	<meta charset="utf-8">	
			font-size : 30px;
<body contenteditable="true">
<p>test test test</p>

As you can see there is no editor logic and page still breaks.

After some googling I have found: (DUP)

Please feel free to remind Webkit about this issue :)

NOTE: Please don't change version number. It is used to indicated when problem started occurring.

comment:6 Changed 11 years ago by Piotrek Koszuliński

Still reproducible. Still Blink and Webkit need a fix ;/.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy