Bug 58647 - Selection removed on opening of context menu
Summary: Selection removed on opening of context menu
Status: RESOLVED DUPLICATE of bug 50116
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 00:50 PDT by victor.fernandez
Modified: 2011-04-15 03:54 PDT (History)
2 users (show)

See Also:


Attachments
Example to reproduce the problem (421 bytes, application/octet-stream)
2011-04-15 00:50 PDT, victor.fernandez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***