<?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>58647</bug_id>
          
          <creation_ts>2011-04-15 00:50:33 -0700</creation_ts>
          <short_desc>Selection removed on opening of context menu</short_desc>
          <delta_ts>2011-04-15 03:54:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>50116</dup_id>
          
          <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>victor.fernandez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>victor.fernandez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>386456</commentid>
    <comment_count>0</comment_count>
      <attachid>89752</attachid>
    <who name="">victor.fernandez</who>
    <bug_when>2011-04-15 00:50:33 -0700</bug_when>
    <thetext>Created attachment 89752
Example to reproduce the problem

When the page of a QGraphicsWebView is set as editable (page()-&gt;setContentEditable(true)) and the user selects some text, opening the context menu causes the selected text to get removed from the page.

Steps to reproduce:
- Compile and run the attached example
- Select some text
- Right-click it to open the context menu

Actual behaviour: The selected text is removed
Expected behaviour: The selected text shouldn&apos;t be removed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>386465</commentid>
    <comment_count>1</comment_count>
    <who name="">victor.fernandez</who>
    <bug_when>2011-04-15 00:56:22 -0700</bug_when>
    <thetext>Apparently, the bug can be workarounded by calling setContentEditable(false) right before opening the context menu, then calling setContentEditable(true) after the menu is closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>386467</commentid>
    <comment_count>2</comment_count>
    <who name="">victor.fernandez</who>
    <bug_when>2011-04-15 00:58:00 -0700</bug_when>
    <thetext>I forgot to mention it happens with Qt 4.7.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>386477</commentid>
    <comment_count>3</comment_count>
    <who name="">victor.fernandez</who>
    <bug_when>2011-04-15 01:41:51 -0700</bug_when>
    <thetext>Actually the problem seems to be broader. The selection is cleared whenever the view loses its focus. For example, if I select some text and switch to another application, then come back, the selection has been removed as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>386498</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-04-15 03:54:17 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 50116 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>89752</attachid>
            <date>2011-04-15 00:50:33 -0700</date>
            <delta_ts>2011-04-15 00:50:33 -0700</delta_ts>
            <desc>Example to reproduce the problem</desc>
            <filename>main.cpp</filename>
            <type>application/octet-stream</type>
            <size>421</size>
            <attacher>victor.fernandez</attacher>
            
              <data encoding="base64">I2luY2x1ZGUgPFF0R3VpPgojaW5jbHVkZSA8UXRXZWJLaXQ+CgppbnQgbWFpbihpbnQgYXJnYywg
Y2hhciAqYXJndltdKQp7CglRQXBwbGljYXRpb24gYXBwKGFyZ2MsIGFyZ3YpOwoJUUdyYXBoaWNz
VmlldyB2aWV3OwoJUUdyYXBoaWNzU2NlbmUgc2NlbmU7CglRR3JhcGhpY3NXZWJWaWV3ICp3ZWJW
aWV3ID0gbmV3IFFHcmFwaGljc1dlYlZpZXc7Cgl3ZWJWaWV3LT5zZXRIdG1sKCI8aHRtbD48Ym9k
eT5UaGUgcXVpY2sgYnJvd24gZm94IGp1bXBzIG92ZXIgdGhlIGxhenkgZG9nLjwvYm9keT48L2h0
bWw+Iik7Cgl3ZWJWaWV3LT5wYWdlKCktPnNldENvbnRlbnRFZGl0YWJsZSh0cnVlKTsKCXNjZW5l
LmFkZEl0ZW0od2ViVmlldyk7Cgl2aWV3LnNldFNjZW5lKCZzY2VuZSk7Cgl2aWV3LnNob3coKTsK
CXJldHVybiBhcHAuZXhlYygpOwp9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>