Friday, February 17, 2012

Flex Button Double Click

Just a quick post on a strange fix for standard behavior in the Flex Button.  The problem I had was that if a user double clicked on a button that had a single click event handler the handler was getting called twice.  In my case this was causing two server calls.  After some searching I figured out this odd fix.  If you set the doubleClickEnabled property to true the second click of the double click will not be dispatched as a single click anymore.  So while I wanted to disable double click I really wanted the button to be aware of double click and then do nothing with it.