[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
RISC: onRowSelect not always triggered  XML
Forum Index -> Development
Author Message
abender

Power User

Joined: 04/02/2010 16:32:13
Messages: 34
Offline

Hi Björn,

a doubleclick on a grid row triggers the onRowSelect event. But sometimes (less than 10% in my case) the browser marks the word you clicked and onRowSelect is not triggered.
Is there a way to prevent this?

Regards
Axel

Axel Bender, DXC Technology
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
Offline

Hi,

both click and double click are fired on mouse-click event - and this is not fired if having moved the mouse between mouse-down and mouse-up. THere is a tolerance of some pixels. - Reason: drag/drop operations must coexist with selection operations.

Could you check if this is the reason for your findings?

Regards, Björn

Björn Müller, CaptainCasa GmbH
abender

Power User

Joined: 04/02/2010 16:32:13
Messages: 34
Offline

Hi Björn,

moving the mosuse is not the reason.

It seems to be a timing problem. With my "normal" doubleclick there is no problem.
If I do a slower doubleclick the word is marked. But I have to try a couple of times to get the timing right.

I had a hard time to reproduce this behaviour, but a customer seems to have the special click-timing.

Regards
Axel


Axel Bender, DXC Technology
abender

Power User

Joined: 04/02/2010 16:32:13
Messages: 34
Offline

Hi Björn,

on my first post I mistakenly wrote onRowSelect instead of onRowExecute.

We have a grid with different actions for onRowSelect and onRowExecute events.
onRowSelect loads data from the server and shows a preview pane beneath the grid. Processig time is about 250-300 milliseconds.
onRowExceute changes the content of the current page and opens a view for editing data associated with the selected row.

When double-clicking first onRowSelect is triggered then onRowExecute.
But the onRowExecute event is not always triggered. Instead the browser highlights the text you clicked on.
This depends of the "speed" of double clicking. Slower clicking reduces the chance of successful onRowExecute.
If you double-click on an empty area in a row onRowExecute is always triggered.

I did some testing with Thread:sleep when executing onRowSelect.
If sleep time in onRowSelect is greater 100 milliseconds then onRowExecute may not be triggered. With shorter sleep times I couln't reproduce the problem.

Regards
Axel

Axel Bender, DXC Technology
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
Offline

Hi Axel,
thanks for this additional input.
...just building up corresponding test scenario...
Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5510
Offline

Hi Axel,

we assume the second click to come within a duration of < 200ms from the first click. Maybe this is too short timing. Even though we did not receive feedback like yours up to now ;-).

Just to give you (and other ones) some background: what happens in case of an event triggering a server interaction?

Code:
 1. event is triggered
 2. call to server is executed
 3. immediately: component is set to DOM-status "enabled=false" so that e.g. in case of text fields no further keyboard input is possible - the component still can receive further clicks
 4. 200ms later: an invisible glass pane is put in front of the whole screen, which catches any other click event.
 5. 250ms later: a color of class pane changes to "shaded"
 6. 1250 ms later: a wait icon is rendered in the middle of the glass pane
 
 If the response of the server is received then of course these steps are immediately aborted.
 


If your server response is fast enough, then a click ends with "3.". So the second click of your double click is processed. There is never a problem situation.

If you server response is slow, then phase 4 might already have been reached, and the second click is consumed by the glass pane. This means in this scenario, the second click must happen before phase 4. is started (i.e. within 200ms).

For the next update we will push the duration until phase 4 is started to 250ms in general... So things are a bit slowed down. We also will offer some configuration possibility - so that scenarios can be checked and tested without doing version-roundtrips with CaptainCasa. ;-)

Thanks again + Regards! Björn

Björn Müller, CaptainCasa GmbH
abender

Power User

Joined: 04/02/2010 16:32:13
Messages: 34
Offline

Hi Björn,
thanks for your quick answer and explanation.
Regards
Axel

Axel Bender, DXC Technology
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team