Mailing List Archive

Javascript checking of button not to be pressed second time
Sometimes when you click (fast) twice on create ticket or send a comment,
it just sends it two times. Happened many times, last time
here: https://trac.ffmpeg.org/ticket/9390#comment:4

Please fix, click on the button should disable that button, that is like
101 of Javascript!

If fixed, please point out the commit.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/301af819-444a-4652-b806-32b5c4a4f7f5n%40googlegroups.com.
Re: Javascript checking of button not to be pressed second time [ In reply to ]
On Fri, Aug 27, 2021 at 6:34 PM ??????? ???????????? <val.zapod.vz@gmail.com>
wrote:

> Sometimes when you click (fast) twice on create ticket or send a comment,
> it just sends it two times. Happened many times, last time here:
> https://trac.ffmpeg.org/ticket/9390#comment:4
>
> Please fix, click on the button should disable that button, that is like
> 101 of Javascript!
>
> If fixed, please point out the commit.
>
> Thanks.
>

The issue was fixed in Trac 1.0.2:
https://trac.edgewall.org/wiki/TracChangeLog#a1.0.2
The relevant entry is:
Multiple forms submits are disallowed (#10138).

See https://trac.edgewall.org/ticket/10138.

There is a problem with your installation. The browser console shows:

9390:73 Uncaught TypeError: $(...).disableSubmit is not a function
at HTMLDocument.<anonymous> (9390:73)
at o (jquery.js:2)
at Object.fireWith (jquery.js:2)
at Function.ready (jquery.js:2)
at HTMLDocument.B (jquery.js:2)

I suspect the static assets were not redeployed after upgrading Trac:
https://trac.edgewall.org/wiki/TracUpgrade#a6.Refreshstaticresources

More details in this ticket:
https://trac.edgewall.org/ticket/12696

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2BBGpn9eZJnRu2CGQFZQhxvEZP2rK%2BiY7ye8D1-WcRUEOZXbYA%40mail.gmail.com.