diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index 79cd8bfba9c..6d0b8ee286b 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -400,6 +400,9 @@ nsTextControlFrame::AttributeChanged(nsIPresContext* aPresContext, if (NS_CONTENT_ATTR_NOT_THERE != rv) { text->SetMaxTextLength(maxLength); } + } else if ((nsHTMLAtoms::readonly == aAttribute) && (nsnull != text)) { + PRBool oldReadOnly; + text->SetReadOnly(nsFormFrame::GetReadonly(this),oldReadOnly); } // Allow the base class to handle common attributes supported // by all form elements... diff --git a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp index 79cd8bfba9c..6d0b8ee286b 100644 --- a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp @@ -400,6 +400,9 @@ nsTextControlFrame::AttributeChanged(nsIPresContext* aPresContext, if (NS_CONTENT_ATTR_NOT_THERE != rv) { text->SetMaxTextLength(maxLength); } + } else if ((nsHTMLAtoms::readonly == aAttribute) && (nsnull != text)) { + PRBool oldReadOnly; + text->SetReadOnly(nsFormFrame::GetReadonly(this),oldReadOnly); } // Allow the base class to handle common attributes supported // by all form elements...