зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f0022c3922
Коммит
268029a69d
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче