Responsivness, drawbacks of decreasing setTimeout
fajerstarter - November 23, 2006 - 21:44
| Project: | Double Click |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
I'll bet you have done some testing with the number insetTimeout(doClick, 300). I'll tested with 150 and it seemed to work for, and the responsivness of single-click improved. What's your experience with this?

#1
sorry for the unclosed tag...
closed now?
#2
Yeah, I suppose that we could actually implement a setting for this. Although then the module would have a setting page :-(
I haven't found that the 300ms feels particularly sluggish and I'm mostly concerned that people get enough time to double click.
I wonder if we could find some statistics on double-clicking out there...
#3
I'm not proposing a settings page! :) I was more curious to know if you had done some actual testing with the number. There's definitely a noticeable lag with 300, small of course, but still there. I might be a fast doubleclicker, but 150 seemed fine for me (and my one additional tester). Statistics would be interesting.
#4
So I've come up with an interim solution for this:
The timout is set by a variable from Drupal (
variable_get('dblclick_time', 300)). If this variable is NOT set, it will be 300 miliseconds. However you can set this variable in a number of ways.Probably the easiest way is to go into the settings.php file and add the following line at the end:
$conf['dblclick_time'] = 150;(or whatever time you would like)
And I will keep an ear to the ground for some statistics about double click timing.
#5