Bug 1498879 - Fix dispatchEvent call in CopyCutController. r=adw
authorDão Gottwald <dao@mozilla.com>
Tue, 16 Oct 2018 17:08:42 +0000
changeset 500106 5052e690160474c2fab0f3f238bac54f5bb2d263
parent 500105 ea8eead18821aa93cdf822056e4643c7e5e58c2f
child 500107 3895062d9e1d37a494a32e035b09ffea13c4fa57
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1498879
milestone64.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 1498879 - Fix dispatchEvent call in CopyCutController. r=adw Differential Revision: https://phabricator.services.mozilla.com/D8829
browser/components/urlbar/UrlbarInput.jsm
--- a/browser/components/urlbar/UrlbarInput.jsm
+++ b/browser/components/urlbar/UrlbarInput.jsm
@@ -522,17 +522,17 @@ class CopyCutController {
       let start = urlbar.selectionStart;
       let end = urlbar.selectionEnd;
       urlbar.inputField.value = urlbar.inputField.value.substring(0, start) +
                                 urlbar.inputField.value.substring(end);
       urlbar.selectionStart = urlbar.selectionEnd = start;
 
       let event = urlbar.document.createEvent("UIEvents");
       event.initUIEvent("input", true, false, this.window, 0);
-      urlbar.dispatchEvent(event);
+      urlbar.textbox.dispatchEvent(event);
 
       urlbar.window.SetPageProxyState("invalid");
     }
 
     ClipboardHelper.copyString(val);
   }
 
   /**