Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348398

Summary: Missing setFocus call on tab selection
Product: [Eclipse Project] Platform Reporter: Eric Moffatt <emoffatt>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, pwebster, remy.suen
Version: 4.1   
Target Milestone: 4.2 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 373814    

Description Eric Moffatt CLA 2011-06-06 10:09:19 EDT
Work TBD from, initially from Bug 346148.
Comment 1 Eric Moffatt CLA 2011-06-07 13:38:02 EDT
We still need to have clicking on the tab area (but outside any tab) to end up calling 'setFocus'...

Also, the context menu for the stack should be able to come up on a right click in the tab area as well. It should only show entries applicable with no specific tab required (i.e. 'Close All' but not 'Close Others').
Comment 2 Curtis Windatt CLA 2012-03-02 12:26:40 EST
Not sure if this is a separate issue or not, but if you have a maximized stack, then un-maximize (regular size?) it, the setFocus call doesn't happen.  In 3.x this works.

1) Open problems view
2) Select something
3) Double click tab to maximize
Result: View gets focus, pressing keys changes selection in view
4) Double click tab to return it to normal size
Result: View does not have focus, tab does, pressing keys changing which tab is selected
Comment 3 Curtis Windatt CLA 2012-03-09 12:30:57 EST
I opened a separate report (bug 373814) to deal with the focus when maximizing, etc.

Fix is on GitHub
https://github.com/mrennie/eclipse.platform.ui/commit/91e233be9121f1498824cf98000250ba83c13358

Paul, please review or pass on to Remy.

The behaviour is now very similar to 3.8.  If you click on the tab or in a dead area of the stack, setFocus is called on the current open tab.  If you middle click on the tab it closes, if you middle click in dead space nothing happens.  If you right click (or whatever your context menu option is) on the tab or in dead space the context menu with close/close all opens.
Comment 5 Curtis Windatt CLA 2012-03-13 17:23:35 EDT
Verified

Version: 4.2.0
Build id: I20120313-0610