Bug with Firefox - Disabled Attribute of Input Not Resetting When Refreshing

Bug With Firefox - Disabled Attribute of Input Not Resetting When Refreshing

This is a "feature" of Firefox which remembers form input values across page refreshes. To fix this behavior, you simply set autocomplete="off" on the form containing the inputs, or just directly to the input.

This stops autocomplete from working and prevents the browser from remembering the state of input fields.

Alternatively, you can just "hard-refresh" by clicking CTRL+F5. This will completely reset the current page.

Firefox keeps form data on reload

Just add autocomplete="off" to your inputs and you will solve the problem.

<input type="text" autocomplete="off">

jQuery to solve this on all inputs and textareas

$('input,textarea').attr('autocomplete', 'off');

Preventing Firefox from remembering the input value on refresh with a meta tag

For an input tag there's the attribute autocomplete you can set:

<input type="text" autocomplete="off" />

You can use autocomplete for a form too.

FireFox handling of disabled fields

I was able to resolve this issue by using jQuery to set and remove the disabled attribute rather than setting it directly. I'm not sure what it does under the hood to make it work.

$(control).attr('disabled', 'disabled');
$(control).removeAttr('disabled');

Input seems disabled for some reason, only with Firefox

After a deep search, I finally found the problem:

$( ".sortable" ).disableSelection();

This line, included in this jqueryUI demo, disable the input in FF.

JsFiddle of the solution

There is also this css -moz-user-select: none; that I personally wrote for disable selection over the text of my menu that cause a wired behavior, alwasys in FF: I will delete it for my solution.

Button Still Disabled after page refresh

Are you using firefox? You may want to disable autocomplete: autocomplete = "off" in your button/inputs. Edit: see the SO question I linked to in the comments.

Firefox nightly text input fields on the webpages are missing

It seems that the Mozilla team noticed this mistake very quickly and restarting Nightly and having it update should solve the problem.



Related Topics



Leave a reply



Submit