Community
Participate
Working Groups
Created attachment 244858 [details] Animated gif showing the odd behaviour I have a DateTime (drop down) and a Combo widget in a control contribution in the toolbar of a view part. When the part has focus, and I then click on any of these controls, it looks like the following is happening: 1. the widget "reacts" on the mouse click (the drop down drops down) 2. setFocus() of the view part is called, setting focus to a control inside it 3. the widget in the control contribution looses focus: 3a - the DateTime dropdown remains visible, but won't react properly on any clicks 3b - the Combo immediately closes itself. I've added a patch to the workbench demo as well as an animated gif that shows the behaviour. We suspect that this problem has been around since RAP 1.4, so this is likely not new.
Created attachment 244859 [details] Patch to the demo project adding a DateTime and a Combo to DemoTableViewPart Added workbench demo patch
I can reproduce it with your snippet.
BTW... does it work as you expect in RCP?
Just tested it with the Eclipse RCP Template (RCP Appplication with a view), using the same control contribution. Works as expected.
RAP uses a workaround (not sure if it's still needed) for part activation in DefaultTabFolder/AbstractTabFolder - activate listener instead of mouse listener (see DefaultTabFolder#activateListener). When you click on a Combo/DateTime in view part toolbar, the toolbar is activated and event TabFolderEvent.EVENT_GIVE_FOCUS_TO_PART is fired. As a result the viewer take the focus again (WorkbenchPart#setFocus is called) and the Combo hides its list.