Bug 1260820 - Search engine drop down closes when I change search engines by pressing Up/Down, r=Gijs.

This commit is contained in:
Florian Quèze 2016-06-10 09:55:30 +02:00
Родитель 8d9648c3dd
Коммит 225ca7a439
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -169,7 +169,13 @@ var gSearchPane = {
gSearchPane.remove(aEngine);
break;
case "engine-current":
gSearchPane.buildDefaultEngineDropDown();
// If the user is going through the drop down using up/down keys, the
// dropdown may still be open (eg. on Windows) when engine-current is
// fired, so rebuilding the list unconditionally would get in the way.
let selectedEngine =
document.getElementById("defaultEngine").selectedItem.engine;
if (selectedEngine.name != aEngine.name)
gSearchPane.buildDefaultEngineDropDown();
break;
case "engine-default":
// Not relevant