Opened 14 years ago

Last modified 10 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:

Description

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: http://foliovision.com/test/ckeditor-3.4/_samples/replacebycode.html

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: http://foliovision.com/test/ckeditor-3.4/uncoy.css

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: 3.44.0.2 (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>
<html>
<head>
	<title>Replace Textarea by Code &mdash; CKEditor Sample</title>
	<meta charset="utf-8">	
	<style>
		body:first-letter{
			font-size : 30px;
		}
	</style>
</head>
<body contenteditable="true">
<p>test test test</p>
</body>
</html>

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

After some googling I have found: https://bugs.webkit.org/show_bug.cgi?id=26442
https://bugs.webkit.org/show_bug.cgi?id=26443
https://bugs.webkit.org/show_bug.cgi?id=6185
https://bugs.webkit.org/show_bug.cgi?id=41514 (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 10 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