Bug 347297 - Close the editor on middle button click on editor tab
Summary: Close the editor on middle button click on editor tab
Status: REOPENED
Alias: None
Product: RAP
Classification: RT
Component: Workbench (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 415766
Blocks:
  Show dependency tree
 
Reported: 2011-05-26 07:48 EDT by Sebastien Arod CLA
Modified: 2013-08-23 10: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 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.