isso icon indicating copy to clipboard operation
isso copied to clipboard

Prevent clicking submit twice

Open cjquines opened this issue 2 years ago • 3 comments

In the following logic, we clear the comment text or close the box only after the API call succeeds. But if the API call takes a few seconds, then excited users might press "submit" multiple times. Maybe disable clicking the "submit" button as soon as it's clicked the first time?

https://github.com/posativ/isso/blob/10e5a90df94d8f1b710f5b1d9a22172fb84e8978/isso/js/app/isso.js#L109-L122

cjquines avatar Jul 16 '22 17:07 cjquines

You'd have to keep track of when to re-enable the button (e.g. editing). But in general, your suggestion is a good idea.

ix5 avatar Jul 19 '22 13:07 ix5

hey @ix5 can i work on this issue

akshatakulkarni25 avatar Feb 21 '23 04:02 akshatakulkarni25

hey @ix5 can i work on this issue

Great, go for it!

ix5 avatar Feb 21 '23 11:02 ix5