Bug 387987 - Selection is cleared in Text box during right click
Summary: Selection is cleared in Text box during right click
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-24 09:32 EDT by DANIEL M CLA
Modified: 2012-09-28 07:30 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DANIEL M CLA 2012-08-24 09:32:13 EDT
*** This bug is only in IE7 and IE9  ***

When the user selects text with the mouse in a Text widget and then press right click, the selection is cleared and the pop-up menu is displayed. The selection should not be cleared when you right click. The problem occurs only when you set a context menu in the Text widget. If the Text widget will have no context menu then the browser default context menu (copy, paste,...) is displayed and the selection is not cleared.

To easily reproduce this problem, use the mail demo example, and add the lines below to the end of the createPartControl method in the view class.

final AboutAction action = new AboutAction(Activator.getDefault().getWorkbench().getActiveWorkbenchWindow());
MenuManager menuManager = new MenuManager("menu"); //$NON-NLS-1$
menuManager.add(action);
menuManager.update();
Menu menu = menuManager.createContextMenu(parent);
text.setMenu(menu);
Comment 1 Ivan Furnadjiev CLA 2012-09-28 07:14:47 EDT
I can reproduce the issue with the steps from the description.
Comment 2 Ivan Furnadjiev CLA 2012-09-28 07:30:59 EDT
Actually .... the selection is unchanged (not visually)... If you click on the "About" menu item and then on the OK button to close the dialog you will see that the selection is restored after the Text widget gains the focus. If you query the selection on the Text widget it has the correct value too.