jquery-ujs icon indicating copy to clipboard operation
jquery-ujs copied to clipboard

Multiple submit buttons

Open smathy opened this issue 9 years ago • 3 comments

When used with multiple submit buttons, clicking one button activates the text of all buttons - which is rarely what you want.

There are workarounds, like this one which remove the text and just disable other buttons. I wonder if there are any use cases where that doesn't make sense?

smathy avatar Jul 20 '15 22:07 smathy

I've just run into an issue where all the buttons don't become enabled again after the ajax has finished loading the request...

Edit: obviously solution was to not disable the buttons!

killerham avatar Nov 07 '15 03:11 killerham

I've run into this issue as well. There's another workaround here, but unfortunately it doesn't work on remote: true forms.

Is there any interest in changing behavior so that only the clicked button changes text while others only get disabled?

DavidVII avatar Sep 27 '16 16:09 DavidVII

It's an edge case I've ran into as well. Although, I wouldn't really call it an edge case as I think having multiple buttons in a form is relatively common. Not the majority, but not an edge - either.

stuarthannig avatar Jun 13 '18 19:06 stuarthannig