[Webkit-unassigned] [Bug 174142] New: When dragging a selection, clearing the selection in dragstart should not crash the web process

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 4 16:30:16 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174142

            Bug ID: 174142
           Summary: When dragging a selection, clearing the selection in
                    dragstart should not crash the web process
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: wenson_hsieh at apple.com

Test case:

<meta name="viewport" content="width=device-width, initial-scale=1">
<code><p id="paragraph" style="font-size: 100px;">START DRAGGING</p></code>
<script>
function select(node) {
    let range = document.createRange(node);
    range.setStartBefore(node);
    range.setEndAfter(node);
    getSelection().removeAllRanges();
    getSelection().addRange(range);
}

select(paragraph.childNodes[0]);
document.body.addEventListener("dragstart", () => {
    getSelection().removeAllRanges();
    paragraph.textContent = "PASS";
    paragraph.style.color = "green";
});
</script>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170704/fd9cfc2f/attachment.html>


More information about the webkit-unassigned mailing list