1 Reply Latest reply on Feb 16, 2009 6:18 AM by Newsgroup_User

    Mouse Clicks' Queue when Button is Disabled

    giladozer
      Hi, I was wondering about the Disable property for UI Components.
      In the docs it says that when the component is disabled it ignores all
      interaction whatsoever - in particular - user interaction.
      In my case, the button is disabled for a few seconds right after it
      was clicked by the user (I disable it till the httprequest is returned
      and then enable it).
      What happens is that if the user clicks the button while it's disabled
      - nothing happens. But when the button turns enabled - it acts as if
      it just got the click event.
      It seems like the mouse click event went into this queue and the
      button listened to it right after to turned enable?
      Am I correct? If so - how can I prevent this problem?
      If I'm wrong, what's the reason for this? And again, how can I sort
      this so the user can't send mouse clicks to the button when it's
      disabled??

      Many thanks :)
      Gilad
        • 1. Re: Mouse Clicks' Queue when Button is Disabled
          Level 7

          "giladozer" <webforumsuser@macromedia.com> wrote in message
          news:gnbng6$o6m$1@forums.macromedia.com...
          > Hi, I was wondering about the Disable property for UI Components.
          > In the docs it says that when the component is disabled it ignores all
          > interaction whatsoever - in particular - user interaction.
          > In my case, the button is disabled for a few seconds right after it
          > was clicked by the user (I disable it till the httprequest is returned
          > and then enable it).
          > What happens is that if the user clicks the button while it's disabled
          > - nothing happens. But when the button turns enabled - it acts as if
          > it just got the click event.
          > It seems like the mouse click event went into this queue and the
          > button listened to it right after to turned enable?
          > Am I correct? If so - how can I prevent this problem?
          > If I'm wrong, what's the reason for this? And again, how can I sort
          > this so the user can't send mouse clicks to the button when it's
          > disabled??

          No idea about whether you're correct or wrong, but you might want to try
          setting mouseEvents = false on the button and see if that helps.