Home » Eclipse Projects » Remote Application Platform (RAP) » Order of events depends on speed of clicking
Order of events depends on speed of clicking [message #1695872] |
Tue, 19 May 2015 23:11 |
Chris Fairhall Messages: 221 Registered: February 2011 |
Senior Member |
|
|
I have a TableViewer.
The TableViewer has a MenuManager.
The MenuManager is set to remove all when shown and has a MenuListener.
The MenuListener adds a set of Action's to the MenuManager when fired, but only if those actions are Enabled.
The actions are SelectionProviderAction's, with the SelectionProvider being the TableViewer.
First Scenario:
When a user right clicks the table, the Selection event and MouseDown even are sent.
This triggers the selection change and the Action's are enabled based on the current selection.
When they release the right mouse button, the MouseUp event is sent and this triggers the menu to show. All is good, only enabled actions are added to the MenuManager.
Second Scenario:
If the user right clicks the table very fast, the Selection even, MouseDown and MouseUp are all sent in the same request.
The Menu is shown first, then the selection event is triggered.
Example of first scenario:
URL Protocol Method Result Type Received Taken Initiator Wait Start Request Response Cache read Gap
/sb?cid=a5572753 HTTP POST 200 application/json 364 B 63 ms XMLHttpRequest 10484 16 0 47 0 388390
{"head":{"requestCounter":20},"operations":[["notify","w1070","FocusIn",{}],["set","w7",{"activeControl":"w1070"}],["set","w1070",{"selection":["w1250"]}],["notify","w1070","Selection",{"item":"w1250","button":3,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w1070",{"focusItem":"w1250"}],["notify","w1070","MouseDown",{"x":358,"y":288,"time":229049,"button":3,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w1",{"cursorLocation":[358,288],"focusControl":"w1070"}]]}
/sb?cid=a5572753 HTTP POST 200 application/json 0.73 KB 31 ms XMLHttpRequest 10594 0 0 31 0 388312
{"head":{"requestCounter":21},"operations":[["notify","w1074","Show",{}],["notify","w1070","MouseUp",{"x":358,"y":288,"time":229125,"button":3,"shiftKey":false,"ctrlKey":false,"altKey":false}],["call","w1070","renderToolTipText",{"item":"w1250","column":0}],["set","w1",{"cursorLocation":[358,288]}]]}
Example of second scenario:
URL Protocol Method Result Type Received Taken Initiator Wait Start Request Response Cache read Gap
/sb?cid=a5572753 HTTP POST 200 application/json 0.71 KB 31 ms XMLHttpRequest 38047 0 0 31 0 480844
{"head":{"requestCounter":22},"operations":[["set","w1070",{"selection":["w1258"]}],["notify","w1070","Selection",{"item":"w1258","button":3,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w1070",{"focusItem":"w1258"}],["notify","w1070","MouseDown",{"x":336,"y":350,"time":256566,"button":3,"shiftKey":false,"ctrlKey":false,"altKey":false}],["notify","w1074","Hide",{}],["notify","w1074","Show",{}],["notify","w1070","MouseUp",{"x":336,"y":350,"time":256580,"button":3,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w1",{"cursorLocation":[336,350]}]]}
I thought RAP ensured the order of events would be consistent?
I'm using RAP 2.3.1
The bundle-version of org.eclipse.rap.rwt is 2.3.1.20140909-1638
The 5 defects fixed in 2.3.2 don't seem to be related.
|
|
| |
Goto Forum:
Current Time: Tue Mar 19 02:15:32 GMT 2024
Powered by FUDForum. Page generated in 0.02038 seconds
|