Closed Bug 451870 Opened 16 years ago Closed 16 years ago

ctrl+mouseup doesn't set left button in event

Categories

(Core :: Widget: Cocoa, defect)

1.9.0 Branch
x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: shanec, Assigned: jaas)

References

Details

(Keywords: verified1.9.0.4)

Attachments

(1 file, 1 obsolete file)

Attached patch osx-mouseup.patch (obsolete) — Splinter Review
ctrl+mousedown shows event.button = 2
ctrl+mouseup shows event.button = 0

patch attached
This is a Cocoa widgets bug, not a Mac widgets bug (Mac widgets are
what Firefox 2.X and prior versions used.)
Component: Widget: Mac → Widget: Cocoa
QA Contact: mac → cocoa
Comment on attachment 335194 [details] [diff] [review]
osx-mouseup.patch

Furthermore, when you submit a patch you should ask someone to review
it.  Normally this would be Josh Aas.  But since your patch is very
straightforward I'm going to r+ it myself.  For good measure I'll also
ask Josh to review it.
Attachment #335194 - Flags: review+
Attachment #335194 - Flags: review?(joshmoz)
Flags: wanted1.9.1?
Flags: wanted1.9.0.x?
Comment on attachment 335194 [details] [diff] [review]
osx-mouseup.patch

   [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent];
 
+  unsigned int modifierFlags = [theEvent modifierFlags];
+  if (modifierFlags & NSControlKeyMask)


Get rid of the newline between "[self convert..." and the code you're adding so it matches mouseDown: stylistically, and there is no reason to create a variable for the modifier flags. Just use the obj-c call in place of the var.

Nice catch, thanks!
Attached patch fix v1.1Splinter Review
updated patch to reflect my comments
Attachment #335194 - Attachment is obsolete: true
Attachment #337924 - Flags: superreview?(roc)
Attachment #337924 - Flags: review+
Attachment #335194 - Flags: review?(joshmoz)
Attachment #337924 - Flags: superreview?(roc) → superreview+
landed on trunk
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: wanted1.9.0.x?
Resolution: --- → FIXED
Attachment #337924 - Flags: approval1.9.0.3?
Comment on attachment 337924 [details] [diff] [review]
fix v1.1

Approved for 1.9.0.4, a=dveditz for release-drivers
Attachment #337924 - Flags: approval1.9.0.4? → approval1.9.0.4+
landed for 1.9.0.4
Keywords: fixed1.9.0.4
Someone correct me if I'm wrong here.

The old behavior is:

ctrl+mousedown shows event.button = 2
ctrl+mouseup shows event.button = 0

The new (correct) behavior is:

ctrl+mousedown shows event.button = 2
ctrl+mouseup shows event.button = 2

This is what I'm seeing when I compare 1.9.0.3 and 1.9.0.4 on my OS X box.
That looks correct to me.
Marking as verified then. Thanks, Josh.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: