<?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>90144</bug_id>
          
          <creation_ts>2012-06-28 01:33:31 -0700</creation_ts>
          <short_desc>WebKitWebView claims that it has a selection while it doesn&apos;t</short_desc>
          <delta_ts>2017-03-11 10:56:43 -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>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Guillaume Desmottes">gdesmott</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>659322</commentid>
    <comment_count>0</comment_count>
      <attachid>149900</attachid>
    <who name="Guillaume Desmottes">gdesmott</who>
    <bug_when>2012-06-28 01:33:31 -0700</bug_when>
    <thetext>Created attachment 149900
test app

- Build and run the attached test app
- Select some text in the text view. As you can see the &apos;selection-changed&apos; signal is fired and webkit_web_view_has_selection() returns TRUE; all good
- Now type some text in the GtkEntry at the bottom of the window and select this text. The view selection is deslected, the signal is fired but webkit_web_view_has_selection() still returns TRUE while there is no selection any more.

Actually, I noticed that single clicking in the view while having a selection does not update webkit_web_view_has_selection() either most of time.

This leads to some copy/pasting issue in Empathy: https://bugzilla.gnome.org/show_bug.cgi?id=603031#c13</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>149900</attachid>
            <date>2012-06-28 01:33:31 -0700</date>
            <delta_ts>2012-06-28 01:33:31 -0700</delta_ts>
            <desc>test app</desc>
            <filename>test-webkit.c</filename>
            <type>text/x-csrc</type>
            <size>1086</size>
            <attacher name="Guillaume Desmottes">gdesmott</attacher>
            
              <data encoding="base64">I2luY2x1ZGUgPGd0ay9ndGsuaD4KI2luY2x1ZGUgPHdlYmtpdC93ZWJraXQuaD4KCnN0YXRpYyB2
b2lkCnNlbGVjdGlvbl9jaGFuZ2VkX2NiIChXZWJLaXRXZWJWaWV3ICp3ZWJraXR3ZWJ2aWV3LAog
ICAgZ3BvaW50ZXIgdXNlcl9kYXRhKQp7CiAgZ19wcmludCAoIndlYmtpdCBzZWxlY3Rpb24gY2hh
bmdlZDogJWRcbiIsCiAgICAgIHdlYmtpdF93ZWJfdmlld19oYXNfc2VsZWN0aW9uICh3ZWJraXR3
ZWJ2aWV3KSk7Cn0KCmludCBtYWluCihpbnQgYXJnYywKICAgIGNoYXIgKiphcmd2KQp7CiAgR3Rr
V2lkZ2V0ICp3aW4sICpib3gsICp2aWV3LCAqZW50cnksICpzY3JvbGw7CgogIGd0a19pbml0ICgm
YXJnYywgJmFyZ3YpOwoKICBib3ggPSBndGtfYm94X25ldyAoR1RLX09SSUVOVEFUSU9OX1ZFUlRJ
Q0FMLCA2KTsKCiAgc2Nyb2xsID0gZ3RrX3Njcm9sbGVkX3dpbmRvd19uZXcgKE5VTEwsIE5VTEwp
OwoKICB2aWV3ID0gd2Via2l0X3dlYl92aWV3X25ldyAoKTsKICB3ZWJraXRfd2ViX3ZpZXdfb3Bl
biAoV0VCS0lUX1dFQl9WSUVXICh2aWV3KSwgImh0dHA6Ly93d3cuY29sbGFib3JhLmNvbSIpOwoK
ICBnX3NpZ25hbF9jb25uZWN0ICh2aWV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