From 7a2f3b007c5630f5d57b5c3cfdde4a652e93339a Mon Sep 17 00:00:00 2001 From: "mikep%oeone.com" Date: Thu, 13 Feb 2003 15:56:09 +0000 Subject: [PATCH] Adding in check for left mouse button when double clicking, bug 191804. --- calendar/resources/content/calendar.js | 15 +++++++++++++++ calendar/resources/content/unifinder.js | 3 +++ calendar/resources/content/unifinderToDo.js | 3 +++ 3 files changed, 21 insertions(+) diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js index 5625f7618e9..f5315f57fed 100644 --- a/calendar/resources/content/calendar.js +++ b/calendar/resources/content/calendar.js @@ -228,6 +228,9 @@ function dayEventItemClick( eventBox, event ) function dayEventItemDoubleClick( eventBox, event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + editEvent( eventBox.calendarEventDisplay.event ); if ( event ) @@ -278,6 +281,9 @@ function dayViewHourContextClick( event ) function dayViewHourDoubleClick( event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + var startDate = gCalendarWindow.dayView.getNewEventDate(); newEvent( startDate ); @@ -324,6 +330,9 @@ function weekEventItemClick( eventBox, event ) function weekEventItemDoubleClick( eventBox, event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + editEvent( eventBox.calendarEventDisplay.event ); if ( event ) @@ -379,6 +388,9 @@ function weekViewContextClick( event ) function weekViewHourDoubleClick( event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + var startDate = gCalendarWindow.weekView.getNewEventDate(); newEvent( startDate ); @@ -424,6 +436,9 @@ function monthEventBoxClickEvent( eventBox, event ) function monthEventBoxDoubleClickEvent( eventBox, event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + gCalendarWindow.monthView.clearSelectedDate(); editEvent( eventBox.calendarEventDisplay.event ); diff --git a/calendar/resources/content/unifinder.js b/calendar/resources/content/unifinder.js index 0778d46ed0d..0e6d6a61d8c 100644 --- a/calendar/resources/content/unifinder.js +++ b/calendar/resources/content/unifinder.js @@ -241,6 +241,9 @@ function formatUnifinderEventTime( time ) function unifinderDoubleClickEvent( event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + // find event by id var calendarEvent = getCalendarEventFromEvent( event ); diff --git a/calendar/resources/content/unifinderToDo.js b/calendar/resources/content/unifinderToDo.js index 27d1b748f83..9f0788a449b 100644 --- a/calendar/resources/content/unifinderToDo.js +++ b/calendar/resources/content/unifinderToDo.js @@ -163,6 +163,9 @@ function getSelectedToDo() function modifyToDoCommand( event ) { + // we only care about button 0 (left click) events + if (event.button != 0) return; + //open the edit todo dialog box var ThisToDo = getToDoFromEvent( event );