Bug 58647

Summary: Selection removed on opening of context menu
Product: WebKit Reporter: victor.fernandez
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: benjamin, victor.fernandez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Example to reproduce the problem none

Description victor.fernandez 2011-04-15 00:50:33 PDT
Created attachment 89752 [details]
Example to reproduce the problem

When the page of a QGraphicsWebView is set as editable (page()->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't be removed
Comment 1 victor.fernandez 2011-04-15 00:56:22 PDT
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.
Comment 2 victor.fernandez 2011-04-15 00:58:00 PDT
I forgot to mention it happens with Qt 4.7.2.
Comment 3 victor.fernandez 2011-04-15 01:41:51 PDT
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.
Comment 4 Benjamin Poulain 2011-04-15 03:54:17 PDT

*** This bug has been marked as a duplicate of bug 50116 ***