RESOLVED DUPLICATE of bug 50116 58647
Selection removed on opening of context menu
https://bugs.webkit.org/show_bug.cgi?id=58647
Summary Selection removed on opening of context menu
victor.fernandez
Reported 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
Attachments
Example to reproduce the problem (421 bytes, application/octet-stream)
2011-04-15 00:50 PDT, victor.fernandez
no flags
victor.fernandez
Comment 1 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.
victor.fernandez
Comment 2 2011-04-15 00:58:00 PDT
I forgot to mention it happens with Qt 4.7.2.
victor.fernandez
Comment 3 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.
Benjamin Poulain
Comment 4 2011-04-15 03:54:17 PDT
*** This bug has been marked as a duplicate of bug 50116 ***
Note You need to log in before you can comment on or make changes to this bug.