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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user