diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index d8d66167600..1c0ceb0b808 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -7541,6 +7541,8 @@ int16_t nsContentUtils::GetButtonsFlagForButton(int32_t aButton) { switch (aButton) { + case -1: + return WidgetMouseEvent::eNoButtonFlag; case WidgetMouseEvent::eLeftButton: return WidgetMouseEvent::eLeftButtonFlag; case WidgetMouseEvent::eMiddleButton: diff --git a/widget/MouseEvents.h b/widget/MouseEvents.h index 23f1eb8e170..bdd710ecd0a 100644 --- a/widget/MouseEvents.h +++ b/widget/MouseEvents.h @@ -111,6 +111,7 @@ public: int16_t button; enum buttonsFlag { + eNoButtonFlag = 0x00, eLeftButtonFlag = 0x01, eRightButtonFlag = 0x02, eMiddleButtonFlag = 0x04,