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:
Timothy Guan-tin Chien
2016-12-30 14:26:35 +08:00
parent 5c5754fa3e
commit 4ab30a1c8c
4 changed files with 8 additions and 8 deletions

View File

@@ -1190,8 +1190,8 @@ HTMLTextAreaElement::RestoreState(nsPresState* aState)
NS_ENSURE_SUCCESS(rv, false);
}
if (aState->IsDisabledSet()) {
SetDisabled(aState->GetDisabled());
if (aState->IsDisabledSet() && !aState->GetDisabled()) {
SetDisabled(false);
}
return false;