<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>114745</bug_id>
          
          <creation_ts>2013-04-17 08:38:46 -0700</creation_ts>
          <short_desc>Browser crashes on shift-click when using -webkit-user-select: none;</short_desc>
          <delta_ts>2016-03-07 12:03:26 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.8</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>104058</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Nortier">bjnortier</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bjonesbe</cc>
    
    <cc>enrica</cc>
    
    <cc>kling</cc>
    
    <cc>rniwa</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>877250</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Nortier">bjnortier</who>
    <bug_when>2013-04-17 08:38:46 -0700</bug_when>
    <thetext>I have an example where &quot;-webkit-user-select: none;&quot; interacts with a shift-click and crashes the browser (Webkit or Safari or Chrome).

This happens if a focussed input field is deleted, and a subsequent shift-click is performed (normally a shift-click would select all text up to the cursor)

Steps to reproduce:
1. Open the attached html file in Webkit/Safari/Chrome, or use the html below
2. Click in the input field to give it focus
3. Press any key (this event will remove the input element)
4. SHIFT + click anywhere in the window

VERSIONS: Webkit 6.0.4 (8536.29.13, 537+), Chrome 28.0.1481.0 canary, Chrome 26.0.1410.65
PLATFORM: Mac
OS: OS X 10.8.3


&lt;!DOCTYPE html&gt;
&lt;html &gt;
&lt;head&gt;

    &lt;style type=&quot;text/css&quot;&gt;
        body {
            -webkit-user-select: none;
        }
    &lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;

    1. Click here to focus -&gt; &lt;input id=&quot;a&quot;/&gt;&lt;br/&gt;
    2. Press any key (the input will be deleted)&lt;br/&gt;
    3. SHIFT + click anywhere&lt;br/&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;
        var a = document.getElementById(&apos;a&apos;);
        a.addEventListener(&apos;keyup&apos;, function(event) {
           document.body.removeChild(a);
        }, false);
    &lt;/script&gt;

&lt;/body&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877251</commentid>
    <comment_count>1</comment_count>
      <attachid>198545</attachid>
    <who name="Benjamin Nortier">bjnortier</who>
    <bug_when>2013-04-17 08:40:11 -0700</bug_when>
    <thetext>Created attachment 198545
HTML file that produces crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877267</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Nortier">bjnortier</who>
    <bug_when>2013-04-17 08:50:07 -0700</bug_when>
    <thetext>I discovered that if I do

a.blur();

before 

document.body.removeChild(a);

then the crash is avoided.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877384</commentid>
    <comment_count>3</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-04-17 11:08:25 -0700</bug_when>
    <thetext>Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebCore             	0x000000010a7d25e4 WebCore::textDistance(WebCore::Position const&amp;, WebCore::Position const&amp;) + 20 (Node.h:474)
1   com.apple.WebCore             	0x000000010a7d2514 WebCore::EventHandler::handleMousePressEventSingleClick(WebCore::MouseEventWithHitTestResults const&amp;) + 2132 (EventHandler.cpp:615)
2   com.apple.WebCore             	0x000000010a7d2a0c WebCore::EventHandler::handleMousePressEvent(WebCore::MouseEventWithHitTestResults const&amp;) + 604 (EventHandler.cpp:717)
3   com.apple.WebCore             	0x000000010a7d61a4 WebCore::EventHandler::handleMousePressEvent(WebCore::PlatformMouseEvent const&amp;) + 2388 (EventHandler.cpp:1642)
4   com.apple.WebKit2             	0x0000000109a34bae WebKit::handleMouseEvent(WebKit::WebMouseEvent const&amp;, WebKit::WebPage*, bool) + 214 (WebPage.cpp:1552)
5   com.apple.WebKit2             	0x0000000109a34aa6 WebKit::WebPage::mouseEvent(WebKit::WebMouseEvent const&amp;) + 164 (WebPage.cpp:1498)
6   com.apple.WebKit2             	0x0000000109a48516 void CoreIPC::handleMessage&lt;Messages::WebPage::MouseEvent, WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&amp;)&gt;(CoreIPC::MessageDecoder&amp;, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::WebMouseEvent const&amp;)) + 83 (HandleMessage.h:347)
7   com.apple.WebKit2             	0x0000000109a45f96 WebKit::WebPage::didReceiveWebPageMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;) + 1298 (WebPageMessageReceiver.cpp:130)
8   com.apple.WebKit2             	0x00000001099829aa CoreIPC::MessageReceiverMap::dispatchMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;) + 132 (MessageReceiverMap.cpp:86)
9   com.apple.WebKit2             	0x0000000109a832a4 WebKit::WebProcess::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&amp;) + 28 (WebProcess.cpp:606)
10  com.apple.WebKit2             	0x0000000109958149 CoreIPC::Connection::dispatchMessage(WTF::PassOwnPtr&lt;CoreIPC::MessageDecoder&gt;) + 101 (ArgumentDecoder.h:47)
11  com.apple.WebKit2             	0x0000000109959d74 CoreIPC::Connection::dispatchOneMessage() + 106 (PassOwnPtr.h:56)
12  com.apple.WebCore             	0x000000010b0191bf WebCore::RunLoop::performWork() + 159 (RunLoop.cpp:93)
13  com.apple.WebCore             	0x000000010b01984f WebCore::RunLoop::performWork(void*) + 63 (RunLoopCF.cpp:67)
14  com.apple.CoreFoundation      	0x00007fff81ee7b31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15  com.apple.CoreFoundation      	0x00007fff81ee7455 __CFRunLoopDoSources0 + 245
16  com.apple.CoreFoundation      	0x00007fff81f0a7f5 __CFRunLoopRun + 789
17  com.apple.CoreFoundation      	0x00007fff81f0a0e2 CFRunLoopRunSpecific + 290
18  com.apple.HIToolbox           	0x00007fff87571eb4 RunCurrentEventLoopInMode + 209
19  com.apple.HIToolbox           	0x00007fff87571c52 ReceiveNextEventCommon + 356
20  com.apple.HIToolbox           	0x00007fff87571ae3 BlockUntilNextEventMatchingListInMode + 62
21  com.apple.AppKit              	0x00007fff8c720563 _DPSNextEvent + 685
22  com.apple.AppKit              	0x00007fff8c71fe22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
23  com.apple.AppKit              	0x00007fff8c7171d3 -[NSApplication run] + 517
24  com.apple.WebCore             	0x000000010b019e2c WebCore::RunLoop::run() + 76 (RunLoopMac.mm:43)
25  com.apple.WebKit2             	0x00000001099f1bec int WebKit::ChildProcessMain&lt;WebKit::WebProcess, WebKit::WebContentProcessMainDelegate&gt;(int, char**) + 702 (ChildProcessEntryPoint.h:100)
26  com.apple.WebProcess          	0x000000010990edf7 main + 228 (ChildProcessMain.mm:73)
27  libdyld.dylib                 	0x00007fff823177e1 start + 1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877399</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-04-17 11:28:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/12279599&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877400</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-04-17 11:29:03 -0700</bug_when>
    <thetext>All crashes are P1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>919466</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-08-21 09:29:22 -0700</bug_when>
    <thetext>This isn’t fixed in bug 104058, is it?

For Apple employees, see also: &lt;rdar://problem/8533388&gt;, &lt;rdar://problem/12279599&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1102006</commentid>
    <comment_count>7</comment_count>
    <who name="Bem Jones-Bey">bjonesbe</who>
    <bug_when>2015-06-15 12:32:37 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; This isn’t fixed in bug 104058, is it?
&gt; 
&gt; For Apple employees, see also: &lt;rdar://problem/8533388&gt;,
&gt; &lt;rdar://problem/12279599&gt;.

I cam across this while looking into something else, but it does look like this isn&apos;t an issue anymore. Any reason it shouldn&apos;t be closed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1171695</commentid>
    <comment_count>8</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2016-03-07 12:03:26 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; This isn’t fixed in bug 104058, is it?
&gt; 
&gt; For Apple employees, see also: &lt;rdar://problem/8533388&gt;,
&gt; &lt;rdar://problem/12279599&gt;.

Yes.

*** This bug has been marked as a duplicate of bug 104058 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>198545</attachid>
            <date>2013-04-17 08:40:11 -0700</date>
            <delta_ts>2013-04-17 08:40:11 -0700</delta_ts>
            <desc>HTML file that produces crash</desc>
            <filename>bug.html</filename>
            <type>text/html</type>
            <size>513</size>
            <attacher name="Benjamin Nortier">bjnortier</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sID4KPGhlYWQ+CgogICAgPHN0eWxlIHR5cGU9InRleHQvY3Nz
Ij4KICAgICAgICBib2R5IHsKICAgICAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTsK
ICAgICAgICB9CiAgICA8L3N0eWxlPgoKPC9oZWFkPgo8Ym9keT4KCiAgICAxLiBDbGljayBoZXJl
IHRvIGZvY3VzIC0+IDxpbnB1dCBpZD0iYSIvPjxici8+CiAgICAyLiBQcmVzcyBhbnkga2V5ICh0
aGUgaW5wdXQgd2lsbCBiZSBkZWxldGVkKTxici8+CiAgICAzLiBTSElGVCArIGNsaWNrIGFueXdo
ZXJlPGJyLz4KCiAgICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CiAgICAgICAgdmFy
IGEgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnYScpOwogICAgICAgIGEuYWRkRXZlbnRMaXN0
ZW5lcigna2V5dXAnLCBmdW5jdGlvbihldmVudCkgewogICAgICAgICAgIGRvY3VtZW50LmJvZHku
cmVtb3ZlQ2hpbGQoYSk7CiAgICAgICAgfSwgZmFsc2UpOwogICAgPC9zY3JpcHQ+Cgo8L2JvZHk+
</data>

          </attachment>
      

    </bug>

</bugzilla>