3 Replies Latest reply on Nov 25, 2008 9:07 PM by John Hall

    defaultButton causes state changes

    2009 Matt
      I'm building a mx:Panel with two buttons (Login and Register) and two states (base and "register"). In the "base" state, I set Login Button as the default button. In the "register" state, I set Register Button as the default button. The base state has two text input fields: userid and password. The "register" state has userid and password plus other fields for personal data. All the fields are checked by Validators before submitting to server. A mx:LinkButton is used to change states.

      When there were no data entered and I submitted the form, I got warning from the Validators. After I did it for both states and if I pressed the Enter key again, the state is changed just like clicking the LinkButton. It should display warnings, not causing state change. It seems the LinkButton becomes the defaultButton.

      When I took away the defaultButton settings, the problem goes away.

      I'm posting this to see if others have seen the same problem.
      I hope I did something wrong, but it looks like a bug. I still want to use the defaultButton, is there any workaround?