Bug 1300385 - Do not set button if undefined.
MozReview-Commit-ID: 9QhsP5Woac0
--- 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";