Community
Participate
Working Groups
*** 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);
I can reproduce the issue with the steps from the description.
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.