Samuel DeVore
2006-Jun-27 18:15 UTC
using observers to detect the difference betwn dbl and single click
Does anyone have a leads or ideas how one could us the Observers to detect and act on single vs double clicks on objects/links? _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Eric Anderson
2006-Jun-27 18:25 UTC
Re: using observers to detect the difference betwn dbl and single click
Samuel DeVore wrote:> Does anyone have a leads or ideas how one could us the Observers to > detect and act on single vs double clicks on objects/links?I have not tested this but shouldn''t this work: Event.observe(my_element, ''dblClick'', function(event) { // ...handle event... }); Just a word of usability warning though. The web is primarily one-click so doing double-click will go against people''s expectations. Also many people double-click on web pages always because that is what they do on their desktop. So they may double-click not realizing that an app will carry out a different action than if the item was single-clicked. Eric