A dashcode's "Lozenge" button element remain "pressed" or clicked after an alert gets displayed inside the button's onclick handler. Then, if I click anywhere in the same page, the onclick event gets fired again.
When I 开发者_如何学编程get the second (undesired) data submission, I also get the following js error: Parts/core/views/Page.js line 378: TypeError: Result of expression 'event.targetTouches[0]' [undefined] is not an object.
I tried to hide the button before the alert and show it after, with no change of behavior at all.
Any thoughts ? Suggestion ? Solutions ?
Thank you so much for your time.
I had the same problem on my web app. What it solved for me was to add following line to the onclick handler:
document.getElementById('YOUR_BUTTON').object._setPressed(false);
Hope it helps.
精彩评论