Bug 570893 - Only re-enable the form controls when reload, not re-disable it, r=bz
With this patch, the disabled state is still kept in the nsPresState, but we will only honor that if the state saved asks as to re-enable the control. The behavior is changed so that controls disabled by JavaScript will be kept enabled as the JavaScript world gets reloaded. MozReview-Commit-ID: 6PchHfx6KYX
This commit is contained in:
@@ -476,8 +476,8 @@ HTMLButtonElement::SaveState()
|
||||
bool
|
||||
HTMLButtonElement::RestoreState(nsPresState* aState)
|
||||
{
|
||||
if (aState && aState->IsDisabledSet()) {
|
||||
SetDisabled(aState->GetDisabled());
|
||||
if (aState && aState->IsDisabledSet() && !aState->GetDisabled()) {
|
||||
SetDisabled(false);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user