Bug 1522508 - When a WebExtension result is selected, the urlbar should be reverted. r=dao
authorMark Banner <standard8@mozilla.com>
Thu, 28 Feb 2019 09:25:07 +0000
changeset 519588 3049be83e02d6a79118eb045831e3502196245f9
parent 519587 a8641920e299c86cbeeaeb32fceb746c059ad759
child 519589 c944e14b8944735a857b9c9f8a3e1213f3383b56
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1522508
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1522508 - When a WebExtension result is selected, the urlbar should be reverted. r=dao Differential Revision: https://phabricator.services.mozilla.com/D21003
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -366,16 +366,19 @@ class UrlbarInput {
           isSuggestion: !!result.payload.suggestion,
           alias: result.payload.keyword,
         };
         const engine = Services.search.getEngineByName(result.payload.engine);
         this._recordSearch(engine, event, actionDetails);
         break;
       }
       case UrlbarUtils.RESULT_TYPE.OMNIBOX: {
+        // The urlbar needs to revert to the loaded url when a command is
+        // handled by the extension.
+        this.handleRevert();
         // We don't directly handle a load when an Omnibox API result is picked,
         // instead we forward the request to the WebExtension itself, because
         // the value may not even be a url.
         // We pass the keyword and content, that actually is the retrieved value
         // prefixed by the keyword. ExtensionSearchHandler uses this keyword
         // redundancy as a sanity check.
         ExtensionSearchHandler.handleInputEntered(result.payload.keyword,
                                                   result.payload.content,