From 268029a69dca05e1eab39236b770ca8e1925ebb2 Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Wed, 24 Jul 2013 16:57:45 -0700 Subject: [PATCH] Bug 896316 - Part 1 - Don't start controlling a read-only input even if it's marked as a login manager field. r=dolske --- toolkit/components/satchel/nsFormFillController.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp index bbe7ecceb14b..0094e83373a7 100644 --- a/toolkit/components/satchel/nsFormFillController.cpp +++ b/toolkit/components/satchel/nsFormFillController.cpp @@ -847,6 +847,8 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent) bool isReadOnly = false; input->GetReadOnly(&isReadOnly); + if (isReadOnly) + return NS_OK; bool autocomplete = nsContentUtils::IsAutocompleteEnabled(input); @@ -862,7 +864,7 @@ nsFormFillController::Focus(nsIDOMEvent* aEvent) nsCOMPtr formControl = do_QueryInterface(input); if (isPwmgrInput || (formControl && formControl->IsSingleLineTextControl(true) && - (hasList || autocomplete) && !isReadOnly)) { + (hasList || autocomplete))) { StartControllingInput(input); }