Firefox has long been saving input values through refreshes, and now the latest builds also save input
/ button
's disabled status through refreshes.
I'm not sure whether this is intended or a bug, but for the time being an workaround is to just set the inputs' disabled
status to their default ones inside a DOM ready handler.
jQuery(function($) {
$("#my_input").prop('disabled', false);
});
Demonstrating the issue: Fiddle (open with Firefox)
And now fixed with the snippet above: Fiddle
You can also apply autocomplete="off"
to the element and its disabled status won't persist through refreshes.
Fiddle
Note that this will prevent any form of auto-completion in the element. Of course, this is an excellent solution for file inputs and buttons, however depending on your use case (e.g. when it involves text inputs) you may prefer the former solution. Thanks to @dsdsdsdsd for the tip!
p.s. This has been reported to Mozilla already: Bugzilla ticket.