forward and back mouse buttons don't work

Bug #202045 reported by Matthew Tighe
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Medium
firefox-3.0 (Ubuntu)
Fix Released
Undecided
Tate

Bug Description

Firefox 3.0 beta 4 seems to be ignoring forward and back mouse clicks.

Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

Created attachment 241282
patch against 1.5.0.7 to map buttons 8-9 to back/forward

Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

I know the patch is against 1.5, but the code doesnt seem to be to different in 2.0 or HEAD

Revision history for this message
In , Martijn-martijn (martijn-martijn) wrote :

Thanks for the patch!
But I don't think this kind of patch would be accepted for branch, since it's not a crash fix or security fix (or major problem).
Does this also need fixing on trunk? Could you make a patch for trunk? Thanks.

Revision history for this message
In , Pierre-bugzilla (pierre-bugzilla) wrote :

Please do. This is a feature I've been missing from day one. Setting up imwheel on every machine is a bit of a pain.

Revision history for this message
In , Ben-bucksch (ben-bucksch) wrote :

Definitely a worthwhile patch, esp. for Mighty Mouse etc., from an unexpected email address :). CONFIRMing.

Revision history for this message
In , Ben-bucksch (ben-bucksch) wrote :

Patch submitter (no name given),

Thanks a lot for the patch!

Can you please update to latest trunk? The patch no longer applies. Once you did so, please request review from appropriate person using "Edit" on your patch. ccing reed for help (I can't see an obvious candidate for review).

I assume the user can still assign system-wide functions to these mouse buttons (e.g. switch window), and this feature won't interfere?

Ideally, it would be configurable within Mozilla. I'd prefer to map them to e.g. "switch to next tab on the right" and "close tab" instead of Back/Forward.

Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

Created attachment 302501
Patch ported to trunk

Here is a patch ported to the trunk.
It shouldn't interfere with anything system-wide as I'd expect that to eat the event before we receive it. As for making it configurable, that would be nice, but I see this happening at a higher level (so that it would be available for windows/mac/etc..).
I'm asking roc for review since he's reviewed most of the recent patches to this file.

Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

Also, I took some of the code used to other buttons event and put it in a more generic method, if its not required, we could just use the DispatchCommandKeyEvent() () method (and maybe renamed it to DispatchCommandEvent()..)

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Yeah, let's just use DispatchCommandKeyEvent. Rename it if you want.

Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

The position doesn't matter? I'll attached an updated patch

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

I don't think it does.

Revision history for this message
In , tester@tester.ca (testertester.ca) wrote :

Created attachment 303461
Simplified patch against trunk

Here's a simplified patch as requested.. Btw, the reason for adding the position onto the event was that the windows version does it.

Revision history for this message
In , Roc-ocallahan (roc-ocallahan) wrote :

Comment on attachment 303461
Simplified patch against trunk

When you ask for review, you should always specify a requestee. Otherwise people might not notice your request.

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in widget/src/gtk2/nsWindow.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v <-- nsWindow.cpp
new revision: 1.260; previous revision: 1.259
done
Checking in widget/src/gtk2/nsWindow.h;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.h,v <-- nsWindow.h
new revision: 1.85; previous revision: 1.84
done

Revision history for this message
Matthew Tighe (tighem) wrote :

Firefox 3.0 beta 4 seems to be ignoring forward and back mouse clicks.

Revision history for this message
HanSolo (millennium-falcon) wrote :

can confirm this problem.

Revision history for this message
Fabien Tassin (fta) wrote :

In beta 4, mouse buttons 8 and 9 are mapped to forward and back.
Works for me.

That's since https://bugzilla.mozilla.org/show_bug.cgi?id=355477 landed upstream.

Revision history for this message
Matthew Tighe (tighem) wrote :

Marking as confirmed

Changed in firefox-3.0:
status: New → Confirmed
Revision history for this message
Matthew Tighe (tighem) wrote :

However, I cannot confirm about the 8 and 9 button thing. I modified my xorg.conf to use 8 and 9 instead of 6 and 7 and it did not work.

Revision history for this message
Fabien Tassin (fta) wrote :

For me, it works out of the box.

Section "InputDevice"
        Identifier "Configured Mouse"
        Driver "mouse"
        Option "CorePointer"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "ExplorerPS/2"
        Option "ZAxisMapping" "4 5"
        Option "Emulate3Buttons" "true"
EndSection

6 and 7 are not bound in firefox/gtk2: http://mxr.mozilla.org/firefox/source/widget/src/gtk2/nsWindow.cpp#2100
They (6/7) are supposed to be used for horizontal scrolling.

Revision history for this message
Matthew Tighe (tighem) wrote :

Here's what I had to modify to get it to work for me:

Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "CorePointer"
    Option "Protocol" "ExplorerPS/2"
    Option "Device" "/dev/psaux"
# Option "Buttons" "7"
    Option "ButtonMapping" "1 2 3 8 9 10 11"
# Option "ZAxisMapping" "6 7"
EndSection

And then I have a script called .mouse-start which runs when I login (this is a hold over from fiesty, but the scroll wheel would not work without it):

#!/bin/sh
exec xmodmap -e "pointer = 1 2 3 8 9 4 5" &
exec imwheel -k -b "6 7" &
exec $REALSTARTUP

I hope this does work out of the box for most people and this is just a hold over thing because I've upgraded.

Revision history for this message
Matthew Tighe (tighem) wrote :

Technically this is by design (see release notes of FF 3.0 beta 4) and mozilla bug 355477.

Changed in firefox-3.0:
status: Confirmed → Fix Released
Changed in firefox:
status: Unknown → Fix Released
Revision history for this message
ulrich (ulrich) wrote :

i'm sorry for being stupid, but how do people with NO mouse buttons 8 and 9 configure this to have back and forth navigation enabled again? i own a logitech mx 500, and as far as i can tell, this mouse doesn't have the buttons 8 and 9.

Revision history for this message
Fabien Tassin (fta) wrote :

In beta 5, buttons 6 and 7 will be mapped to horizontal scrolling. See https://bugzilla.mozilla.org/show_bug.cgi?id=423563

If you just have a 3 buttons mouse with a wheel, <Shift> + wheel does back and forward,

Revision history for this message
ulrich (ulrich) wrote :

as in beta 4.
my mouse has those extra buttons 6 7 and they worked fine til beta 4 came along.
see http://www.everythingusb.com/hardware/resize.php?size=153&filename=logitechmx500.jpg

Tate (taito-vanhapiha)
Changed in firefox-3.0 (Ubuntu):
assignee: nobody → Tate (taito-vanhapiha)
Changed in firefox:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.