From 82bf3117e9196f51b5c8d1c51636dad443fdb386 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 6 Jul 2004 17:43:51 +0000 Subject: -1 is valid button number, it's used for synthesised "mouse" events on 2004-07-06 Christian Persch * embed/mozilla/EventContext.cpp: -1 is valid button number, it's used for synthesised "mouse" events on form submit via Return key. Fixes bug #145420. --- ChangeLog | 7 +++++++ embed/mozilla/EventContext.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index e49236da5..216d58512 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-06 Christian Persch + + * embed/mozilla/EventContext.cpp: + + -1 is valid button number, it's used for synthesised "mouse" events + on form submit via Return key. Fixes bug #145420. + 2004-07-06 Christian Persch * configure.in: diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index dde8d040a..2981e0789 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -594,6 +594,13 @@ nsresult EventContext::GetMouseEventInfo (nsIDOMMouseEvent *aMouseEvent, Mozilla info->type = EPHY_EMBED_EVENT_MOUSE_BUTTON3; break; + case (PRUint16) -1: + /* when the user submits a form with Return, mozilla synthesises + * a _mouse_ click event with btn=65535 (-1). + */ + info->type = EPHY_EMBED_EVENT_KEY; + break; + default: g_warning ("Unknown mouse button"); } -- cgit v1.2.3