It sounds to me like you have a setfocus soomehwere that is still overriding the click event. For example, if you have a field that doesn't check if (xfa.event.commitKey == 3) before setFocus is called, it doesn't matter which other field (or button) you click on, you will be sent to the field specified by the setFocus. "Double clicking" isn't a double click, it's one click which is overridden by a setFocus (which sends you somewhere else) then a second click which isn't interrupted by a setfocus, which means that you can click the button.
I don't think that I've explained myself well, so here is step-by-step what I think is happening:
- You are currently in a field that just has a setFocus without checking the commitKey.
- You click on the button.
- Due to the setFocus, you are sent to a different field that is not the button. This means that the button never fires teh click event. the second field that you are sent to has the proper commitKey checks.
- You click on the button again,
- This time, because the new field you are in has the proper commitKey check, you are not sent to another field, and your click succeeds.
I hope that did a good job of explaining my guess as to what is happening. Check all of your exit events to make sure that they are all using the if (xfa.event.commitKey == 3) then bit. having forgotten one would explain why this doesn't happen all the time... it's only happening when you try to click the button while you are in the field wihtout the commitKey check.