Bug 26690

Summary: text not rendered when text-overflow: ellipsis is changed to text-overflow: content after the contentEditable property of the div is changed.
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jberlin, karlcow, thakis, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Test case for text-overflow: ellipsis, clip and contentEditable
none
rendering in Safari, firefox, chrome none

Description Jessie Berlin 2009-06-24 12:50:46 PDT
Given a div with the following CSS inside a containing div of specified width:

	white-space: nowrap;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;

Do the following:

1. Set the CSS (via resetting the class name via javascript) to:

	white-space: nowrap;
	width: 100%;
	overflow: hidden;
        text-overflow: clip;

2. Set contentEditable on that div to "true" via javascript.
3. Edit the content of the div via the UI and add in text that would normally overflow the containing div.
4. IMPORTANT: inside the div, make sure the marker is at the right-most end of the text. If it is not, the bug does not get reproduced.
5. End the edit by setting contentEditable on that div to "false" via javascript.
6. Give the div the original css (via reseting the class name via javascript)

Observe that the div now appears to be empty, but it really is not (discoverable by looking at the innerHTML). What should be there is the text at either the beginning (preferred) or end of the text entered in step 3, with ellipsis where it starts being hidden.

Firefox has some other bug that prevents me from doing step 4, and IE shows similar behavior.

Not sure if this is reproducible on Mac, test case to follow.
Comment 1 Jessie Berlin 2009-06-24 12:56:22 PDT
Created attachment 31803 [details]
Test case for text-overflow: ellipsis, clip and contentEditable
Comment 2 Karl Dubost 2022-06-03 01:40:05 PDT
Created attachment 460004 [details]
rendering in Safari, firefox, chrome

Only Firefox shows the text in the pink area.
Safari and Chrome gives a blank pink area.
Comment 3 Radar WebKit Bug Importer 2022-06-03 01:40:40 PDT
<rdar://problem/94335907>