Bug 1300385 - Do not set button if undefined. r=Waldo
authorRob Wu <rob@robwu.nl>
Sun, 04 Sep 2016 05:53:25 -0700
changeset 354598 69c9fab3db00072506378034eca2ecd4cf0d2f75
parent 354597 6a240891ba8afd09b89f079d0bd13e94c227e6b2
child 354599 3f49ce4738e2ba432b0a2fddc85e4d16d7893de6
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1300385
milestone51.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 1300385 - Do not set button if undefined. r=Waldo MozReview-Commit-ID: 9QhsP5Woac0
browser/base/content/contentSearchUI.js
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -269,19 +269,21 @@ ContentSearchUIController.prototype = {
       searchString: searchTerms,
       healthReportKey: this._healthReportKey,
       searchPurpose: this._searchPurpose,
       originalEvent: {
         shiftKey: aEvent.shiftKey,
         ctrlKey: aEvent.ctrlKey,
         metaKey: aEvent.metaKey,
         altKey: aEvent.altKey,
-        button: aEvent.button,
       },
     };
+    if ("button" in aEvent) {
+      eventData.originalEvent.button = aEvent.button;
+    }
 
     if (this.suggestionAtIndex(this.selectedIndex)) {
       eventData.selection = {
         index: this.selectedIndex,
         kind: undefined,
       };
       if (aEvent instanceof MouseEvent) {
         eventData.selection.kind = "mouse";