Bug 896316 - Part 1 - Don't start controlling a read-only input even if it's marked as a login manager field. r=dolske

This commit is contained in:
Matthew Noorenberghe 2013-07-24 16:57:45 -07:00
Родитель f0022c3922
Коммит 268029a69d
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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<nsIFormControl> formControl = do_QueryInterface(input);
if (isPwmgrInput || (formControl &&
formControl->IsSingleLineTextControl(true) &&
(hasList || autocomplete) && !isReadOnly)) {
(hasList || autocomplete))) {
StartControllingInput(input);
}