Backed out changeset b7597732606e (bug 1501623)for failing at browser_autocomplete_edit_completed.js on a CLOSED TREE.

This commit is contained in:
Gurzau Raul 2019-02-02 02:43:33 +02:00
parent 803eadae41
commit 8200b1ffe6

View File

@ -367,6 +367,7 @@ class UrlbarInput {
*/
setValueFromResult(result) {
let val;
switch (result.type) {
case UrlbarUtils.RESULT_TYPE.SEARCH:
val = result.payload.suggestion || result.payload.query;
@ -388,13 +389,6 @@ class UrlbarInput {
}
this.value = val;
// Dispatch the input event to update userTypedValue. See bug 287996.
let event = this.document.createEvent("UIEvents");
event.initUIEvent("input", true, false, this.window, 0);
this.inputField.dispatchEvent(event);
// Both the value setter and the input event handler clobber the actiontype
// attribute, so update this last.
switch (result.type) {
case UrlbarUtils.RESULT_TYPE.TAB_SWITCH:
this.setAttribute("actiontype", "switchtab");