Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree Missing Mouse Events #112

Closed
awcab opened this issue Mar 9, 2012 · 4 comments
Closed

Tree Missing Mouse Events #112

awcab opened this issue Mar 9, 2012 · 4 comments

Comments

@awcab
Copy link

awcab commented Mar 9, 2012

When using the Grid with a Tree column, it seems that mouse clicks do not always result in expanding or collapsing the node as expected.

This shows up in the example below.

It is most obvious/noticeable when opening/closing the same node, but it happens when clicking on different nodes as well, such as when attempting to recursively open a node hierarchy.

http://sitepen.github.com/dgrid/dgrid/test/Tree.html

@ghost
Copy link

ghost commented Mar 9, 2012

I realize this is probably not the easiest thing to describe, but could you be more specific about how exactly you are clicking and how behavior deviates from the expectation? (For instance, are you talking about double-clicking anywhere in the tree cell, or clicking the expando icon?)

The only ways I am able to get the tree to "miss" are the following, and I believe both are explainable (and would be issues pretty much anywhere):

  • clicking the expando icon twice quickly only toggles expand/collapse once in some browsers/cases - some browsers specifically don't fire click events for the 2nd click of a detected double-click event.
  • attempting to double-click the tree cell, but unintentionally moving the mouse between the two clicks - it seems to me like either browsers or the OS itself have a certain movement threshold beyond which the second click is no longer considered part of a double-click action, even if the two clicks were in close enough proximity in terms of time.

@awcab
Copy link
Author

awcab commented Mar 12, 2012

As I mentioned, I have seen this in other cases, but it is most obvious when repeatedly opening/closing the same node.

Overall, something about the click handling makes the tree feel less responsive than it should. Other widgets do not all share this problem, so I'm pretty sure its not the browser or OS. For example, in the editor test (http://sitepen.github.com/dgrid/dgrid/test/Editor.html), the combo widget responds to every click as expected.

@EToreo
Copy link

EToreo commented Mar 12, 2012

@SitePenKenFranqueiro I agree with Mr. Aer0naut, but also see what you are saying. I was able to get different behavior from IE8 and Chrome 16.something when testing the double click you describe in your first bullet point. In IE8, the expando reacts responsively to clicks no matter how fast I try to click. In Chrome, it ends up missing clicks - probably because Chrome registers a double click like you said.

This all being said, the second test case Ar0naut points to has a 100% responsive date dropdown widget in all browsers. The dropdown gets toggled no matter how fast I click my mouse button. This seems at odds with the theory that Chrome (and other browsers) are hijacking your events as double clicks and there is nothing you can do about it.

Maybe a click and a double click on the expando icon mean the same thing? I think that would make for a much more usable dgrid.

@ghost
Copy link

ghost commented Mar 13, 2012

The Dijit drop-down widgets may seem a bit more responsive because they respond to mousedown for opening and closing its menu, rather than click. While we could listen to that for expando clicks, doing so for cell double-clicks would require significant logic that dblclick already handles quite adequately in most cases. Moreover, binding to mousedown means that users are unable to "drag off" to cancel, if they accidentally pressed their mouse button and don't actually want to click.

After some more testing, I am really not finding Tree to be all that unresponsive. I seriously have to try to get it to not respond (e.g. to produce one of the two circumstances I outlined above), and indeed, the only place I really see it being an issue is to click the same expando icon twice quickly in a row, which doesn't seem like a terribly common use case.

Is there a particular browser you find more problematic than others, that I should be looking at?

@ghost ghost closed this as completed in f82cd96 Jun 4, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants