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

Bug 283944

Summary: Stop bubbling events that can affect parent widgets
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.2   
Target Milestone: 1.3 M2   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 193880, 282679, 283541, 283542, 283543, 283544, 283545, 284374, 284375, 284376    
Bug Blocks:    

Description Ralf Sternberg CLA 2009-07-19 05:10:36 EDT
DOM events are usually propagated to the parent of their target element. For details, see [1].
In SWT, there is no such event bubbling - events are only delivered to the focus control (apart from accelerators and traversal) [2].

Bubbling events cause problems when they affect a parent of the focus widget, such as causing an outer scrolled composite to scroll or a tab folder to change the active tab. Thus, client-side widgets need to stop event bubbling for events that potential parent widgets rely on.

The key event subsystem is not affected by this issue, thus we only need to care for those events that affect parent widgets on the client side. Events in question are:

* Mouse wheel events
* Key events for arrow keys, Home, End, PageUp/Down

Note that some key events need to be propagated, e.g. Return to keep the Shell default button working.
Items should probably not swallow events, since their parents rely on receiving item events.

[1] http://www.quirksmode.org/js/events_order.html
[2] SWT: The Standard Widget Toolkit, Volume 1, Steve Northover, Mike Wilson, 2.1 When a Key Is Typed, Where Does It Go?
Comment 1 Ivan Furnadjiev CLA 2009-08-24 07:32:26 EDT
All affected widgets are fixed. Changes are in CVS HEAD.