Anyone familiar with the :disable_with option will know that it gets resized on click to accomodate the new text entering the button. I’d like to have the button keep its original size regardless of the button’s new content. Anyone know a way to do that?
Thanks
When you are using the
:disable_withoption, you are using the Rails Unobtrosive Javascript driver, jquery-ujs since Rails 3.1 which calls thedata-disable-withdata handler here:If you’ll notice, nothing is re-sizing your button here. The expansion is most likely caused by the extra text, although it may be caused by some default jQuery CSS attached to the
disabledattribute (I haven’t actually checked but this seems very unlikely). I suggest writing rigid CSS rules to keep the box from re-sizing or doing anything else you dislike. Either way this will fix your problem.