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

Bug 347297

Summary: Close the editor on middle button click on editor tab
Product: [RT] RAP Reporter: Sebastien Arod <sebastien.arod>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: REOPENED --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 415766    
Bug Blocks:    

Description Sebastien Arod CLA 2011-05-26 07:48:15 EDT
Build Identifier: 

In RCP workbench a middle button click on the editor tab closes the editor.

This behavior is disabled in RAP.


Reproducible: Always
Comment 1 Ivan Furnadjiev CLA 2013-07-26 10:57:35 EDT
The commented code (mouse listener) is located in PaneFolder class. I've tried to enable the code, but the listener is not notified. In RAP mouse events are not fired outside the CTabFolder client area (tabs area).
Comment 2 Ivan Furnadjiev CLA 2013-07-29 03:43:36 EDT
Fixed in master with commit 7c1dbe58900d320d5cf20476bf236b49c61ff80c. Client sends "close" event when middle button is clicked.
Comment 3 Ralf Sternberg CLA 2013-07-30 08:33:22 EDT
I can't reproduce this behavior with SWT/GTK. Tabs do not close on middle click. If this is a workbench feature, it should not be implemented in the widget itself, should it?
Comment 4 Ivan Furnadjiev CLA 2013-07-31 10:46:13 EDT
(In reply to comment #3)
> I can't reproduce this behavior with SWT/GTK. Tabs do not close on middle click.
> If this is a workbench feature, it should not be implemented in the widget
> itself, should it?
Agree. More over I found that the fix (from comment #2) is not clean/complete. Client sends "close" event on mouseup, because DOM "click" event is not fired for middle button. Thus you can press mouse button on one tab, but release it on another. As a result the last tab will be closed. As it becomes more complex than I expected I reverted the fix for now with commit bd1cc7f6c88c8bc81e4d44d0f863657e50b06e68.