[TIMOB-10373] TiAPI: event system: Event ordering
GitHub Issue | n/a |
Type | Sub-task |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | TiAPI |
Labels | api |
Reporter | Blain Hamon |
Assignee | Unknown |
Created | 2012-08-09T12:21:54.000+0000 |
Updated | 2018-02-28T20:03:24.000+0000 |
Description
Many times, a single stimulus (Such as a user pressing a finger on the screen, then lifting said finger) can trigger multiple events. Which events, and the sequence of these events need to be addressed for parity.
BEHAVIOR:
Given two events that bubble, A and B, and a view hierarchy where events to view1 bubble to view2:
*Events A and B will be processed in the same order in view1 as in view2. That is, for view1, A then B, then for view2, A then B.
* Because of rules of bubbling, event A for view1 will happen before A for view2, and event B for view1 will happen before B for view2.
* Because of rules of bubbling, event A does not affect event B. For example, if A's bubbling is cancelled, B will continue to bubble.
* However, the behavior between the views and different events are undefined. Both are valid sequences:
*# View1 A, View1 B, View2 A, View2 B.
*# View1 A, View2 A, View1 B, View2 B.
Action items:
Enumerate all situations where multiple events are called
#* Eg, Click and tap, focus and open
For each, determine sequence that should happen
For each sequence, generate subtasks to implement on respective OSes.
Attachments
Situations where multiple events are called:
Focus, blur, open, close: Window and tab Lifecycle events
Focus and blur for textfields: Keyboard/trackpad events
Click, tap, touchup, touchdown, swipe: touch events
Added proposal for window and tab lifecycle events. Will need to determine where blur/focus happen, and possibly propose a third pair to represent the other case.
Arch meeting notes: Window FSM agreed upon for open/close, and focus/blur for when a window is the primary receptor of user events (THIS IS A BEHAVIOR CHANGE). Action item for Blain was to propose a name for the event pair in the middle.
Text fields: Blur on old field happens before focus on new field. This happens in the same action at the OS level.
This issue should address the issue raised in TIMOB-11573.