[Webkit-unassigned] [Bug 102435] New: execCommand on contenteditable with white-space: pre-wrap hangs WebKit
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 15 14:34:14 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=102435
Summary: execCommand on contenteditable with white-space:
pre-wrap hangs WebKit
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: simonjam at chromium.org
This was reported in the Chrome bugtracker:
https://code.google.com/p/chromium/issues/detail?id=161335
It's confirmed broken in Chrome 23.0.1271.64 and a Mac WebKit build from yesterday. It works fine in Safari 6.0.2.
Here's the test case:
<html>
<head>
<style>
.textbox {
white-space: pre-wrap;
}
</style>
</head>
<body>
<div class="textbox" contenteditable="true"><div><span style="color: rgb(66, 240, 72);">WELCOME TO THE <span style="color: rgb(66, 136, 240);">JUNGLE</span></span></div><ol><li><span style="color: rgb(240, 66, 202);">What is the air speed velocity of an </span><span style="color: rgb(74, 140, 79);"> </span><span style="color: rgb(140, 74, 88);">unladen swallow</span></li><li style="color: rgb(140, 74, 88);"><span style="color: rgb(140, 74, 88);">What do you mean, African or European swallow?</span></li><ul><li style="color: rgb(140, 74, 88);"><span style="color: rgb(140, 74, 88);">I don't know that...</span><br></li></ul></ol></div>
<script>
var selectElements = function(start, end) {
var range = document.createRange(),
selection = window.getSelection();
range.setStart(start, 0);
range.setEnd(end, end.textContent.length);
selection.removeAllRanges();
selection.addRange(range);
}
document.execCommand('styleWithCSS', false, true);
selectElements(document.querySelector('.textbox ol li:nth-of-type(1) span:nth-of-type(3)').firstChild, document.querySelector('.textbox ol ul li span').firstChild);
document.execCommand('foreColor', false, '#123123');
</script>
</body>
</html>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list