Blog.

Button With Buffered Clicks

Code in this post can be obsolete, however, principles and theory may still apply.
My users are used to double-clicks to such a degree that they double-click everything, also buttons. This has created the problem with buttons that add records to grid as always two records were added. Here is handling:

this.toolbar.add({
   id:this.id + '-btn-add-record'
  ,text:this.addText
  ,tooltip:this.addRecordText
  ,iconCls:'icon-plus'
  ,disabled:true
  ,listeners:{
     scope:this
    ,click:{fn:this.onTbarClick.createDelegate(this, ['add']), buffer:200}
  }
});
saki
Follow me:
Latest posts by saki (see all)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your username and password to log into your account. Don't have an account? Sign up.

Want to collaborate on an upcoming project?