Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9244189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:58:05+00:00 2026-06-18T08:58:05+00:00

Anyone familiar with the :disable_with option will know that it gets resized on click

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:58:05+00:00Added an answer on June 18, 2026 at 8:58 am

    When you are using the :disable_with option, you are using the Rails Unobtrosive Javascript driver, jquery-ujs since Rails 3.1 which calls the data-disable-with data handler here:

    /**
     * disable-with handlers
     */
    var disable_with_input_selector = 'input[data-disable-with]';
    var disable_with_form_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')';
    
    $(disable_with_form_selector).live('ajax:before', function () {
        $(this).find(disable_with_input_selector).each(function () {
            var input = $(this);
            input.data('enable-with', input.val())
                 .attr('value', input.attr('data-disable-with'))
                 .attr('disabled', 'disabled');
        });
    });
    
    $(disable_with_form_selector).live('ajax:complete', function () {
        $(this).find(disable_with_input_selector).each(function () {
            var input = $(this);
            input.removeAttr('disabled')
                 .val(input.data('enable-with'));
        });
    });
    

    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 disabled attribute (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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone familiar with the emulator will know that during the loading phase the 'screen'
Is anyone familiar with a tutorial out there that will let me create a
For anyone familiar with lambdaj (not I) you will have seen this stacktrace, or
Anyone know how I can make a login button in Ruby on Rails for
Anyone know how to set the custom 404 Error pages that the Visual Studio
Anyone know of a tutorial online that explains how to integrate alexbilbie CodeIgniter-OAuth-2.0-Server as
Does anyone familiar with libxml++ know if it's possible to load the XML document
Does anyone familiar with Lightbox2 ( http://www.huddletogether.com/projects/lightbox2/ ) know how to trigger a lightbox
Is anyone familiar with a Java library that helps with parsing the fields (date,
Is anyone familiar with a framework or library that can be added to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.