Go to docs.google.com
Create a presentation
Click in one of the text fields
Type a <enter> b <enter> c
Click unordered list button
I see http://trac.webkit.org/changeset/34354 attempts to fix a similar sounding issue. But I still get a hang in a nightly at r34367 with the above steps. I tried a few quick things to see if I could figure out the solution.
The problem is that in the while loop on line 86 of InsertListCommand.cpp, startOfCurrentParagraph.deepEquivalent().node() is NULL. I tried checking startOfCurrentParagraph.isNotNull() in the while's conditional check. That successfully avoids the hang, but also skips over the div containing the "b".
FYI - We've got a workaround in our js for this issue (we just insert a dummy div as the first node inside the contentEditable div and the problem goes away) that we will be pushing into production soon, so this easy to repro test case will be disappearing on you.
This is a reproducible full browser hang (thus crash) in Safari and should be a P1.
Created attachment 21947 [details]
sample from the hang on my mac
This might be the same root cause as bug 19071.
Without a test case, this bug is going to soon be useless to us, since the docs.google.com reproduction is going away. :( Perhaps something like this will work?
document.designMode = "on";
(In reply to comment #5)
> Without a test case, this bug is going to soon be useless to us, since the
> docs.google.com reproduction is going away. :( Perhaps something like this
> will work?
To confirm, the above (very simple) proposed test does not repro the hang.
(In reply to comment #6)
> (In reply to comment #5)
> > Without a test case, this bug is going to soon be useless to us, since the
> > docs.google.com reproduction is going away. :( Perhaps something like this
> > will work?
> To confirm, the above (very simple) proposed test does not repro the hang.
The Docs test case seemed to have something to do with other elements in the document (but not in the editable area) being set unselectable (el.style.WebKitUserSelect = 'none'). In our case, it is the toolbar on the page that is unselectable (as are all its children). In fact, setting an empty div to unselectable did not repro the bug but having at least one level of nested divs each of which were unselectable did repro the bug.
I'll try to create a small test case.
i'll try and get to this today
Minimal test case in Midas demo:
(select b and c, insert unordered list)
(In reply to comment #9)
> Minimal test case in Midas demo:
> (select b and c, insert unordered list)
I just tried that at http://www.mozilla.org/editor/midasdemo/ and it did not hang a Debug r41792 but did not repro the hang. Annie, was I trying correctly? Or is this just fixed?
However WebKit's behavior here disagree's with firefox's. I like FF's better (they make b,c into a new sublist).
I have reproduced this with Safari 5 (on windows but this was based on the a complaint from a mac user). I have narrowed it down to simple test html - below. Just select the text at the top and hover over the 2nd text below, then the 3rd and it hangs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Test hang page</title>
<div contenteditable="true" style="position: absolute; top: 5px; left: 15px; width: 200px; height: 200px; ">Highlight this and hover above text below<br>Replace this sample text with some text of your own.</div>
<div style="position:relative;top:200px;" onmouseover="document.execCommand('InsertOrderedList',false,null)">highlight above text and hover over this first</div>
<div style="position:relative;top:300px;" onmouseover="document.execCommand('InsertUnorderedList',false,null)">then hover over this</div>