Update urlbar state management to fix Enter key in Nightly

- Upstream bug 1306639 changed how the urlbar state is set. Update how
	we set urlbar state to work with the new approach.

Fixes #322.
This commit is contained in:
Jared Hirsch 2016-10-17 10:52:34 -07:00 коммит произвёл Chuck Harmston
Родитель 3025a33621
Коммит 1c8c3e504c
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -357,7 +357,11 @@ HighlightManager.prototype = {
// Now that we've figured out which item will take the highlight,
// update the DOM, and fire a signal that sets the newUrl in the urlbar.
if ('setInitiallySelectedIndex' in this.popup.el.input.controller) {
this.popup.el.input.controller.setInitiallySelectedIndex(newIndex);
} else {
this.popup.el.selectedIndex = newIndex;
}
this.recommendation.isHighlighted = shouldHighlightRecommendation;
this.events.publish('selection-change', { newUrl: newUrl });
}