Closed Bug 814303 Opened 10 years ago Closed 10 years ago

[Mac] Zoom-in/out is not available with mouse wheel since control+wheel is reserved by OS and the default action is always used when two or more modifiers are active

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: gh108, Assigned: masayuki)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20121119183901

Steps to reproduce:

In FF17 (Mac OS X10.6.8) I tried to zoom in and out while pressing control-option and scrolling back and forth with the mouse wheel. 


Actual results:

No response.


Expected results:

Using this shortcut the webpage text SHOULD zoom in and out. Up to FF16.0.2 this keyboard shortcut worked fine but it is now broken. Command +/- works ok but the mouse scroll method is faster and more convenient.
Last good nightly: 2012-08-11
First bad nightly: 2012-08-12

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b5ae446888f5&tochange=df8bdd5813f0
I suspect bug 719320
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
Blocks: 719320
Why do you use control-option rather than control?
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #3)
> Why do you use control-option rather than control?

Because it was easier and faster to simply hold down the control-option keys and use the scroll wheel to zoom than having to keep tapping the + or - keys (command) to increase/decrease the size of text. I prefer to use the mouse wheel to the +/- keys. Command-mouse scroll would work just as well if it was enabled.
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #3)
> Why do you use control-option rather than control?

Please ignore my comment above, I mistook control for command.

Control-mouse scroll blows up the whole screen whereas control-option-mouse scroll increases (or decreases) the text within the browser only.
(In reply to gavin from comment #5)
> (In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #3)
> > Why do you use control-option rather than control?
> Control-mouse scroll blows up the whole screen whereas control-option-mouse
> scroll increases (or decreases) the text within the browser only.

I see, control+wheel is reserved by MacOS. However, I'm not sure the old behavior has been implemented intentionally since there were no comments about that and the old GetBasePrefKeyForMouseWheel() looks weird.

So, how do you know control+option+wheel is available for zoom-in/out on Mac? If that is enough well-known function, we must fix this bug. However, if it's not so, let's fix this bug with that *or* another approach if there is it.
Assignee: nobody → masayuki
Component: DOM: Events → Event Handling
Summary: From FF17 zoom +/- broken under Control-Option, scrolling with mouse wheel → [Mac] control+option+mouse wheel doesn't work as zoom-in/out since default action is used when two or more modifiers are active
Version: 17 Branch → Trunk
Note:

Safari and Chrome don't have any special action for modifier+wheel on Mac (at least in their default settings).

Opera has zoom-in/out for option+wheel and history-go-back/forward for shift+wheel.
It might be better to use command key if we can set the default action of command+wheel as zoom-in/out. It's similar to the behavior on other platforms whose control key is the primary modifier key for shortcut keys.
Summary: [Mac] control+option+mouse wheel doesn't work as zoom-in/out since default action is used when two or more modifiers are active → [Mac] Zoom-in/out is not available with mouse wheel since control+wheel is reserved by OS and the default action is always used when two or more modifiers are active
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #6)
> 
> I see, control+wheel is reserved by MacOS. However, I'm not sure the old
> behavior has been implemented intentionally since there were no comments
> about that and the old GetBasePrefKeyForMouseWheel() looks weird.
> 
> So, how do you know control+option+wheel is available for zoom-in/out on
> Mac? If that is enough well-known function, we must fix this bug. However,
> if it's not so, let's fix this bug with that *or* another approach if there
> is it.

Not sure what's standard and what's not but the same control-option-wheel still works OK in the latest version of Camino. As far as I know these 2 apps are the only ones which use this shortcut.

If you were thinking of changing to command-wheel that would be just as good. I came across this shortcut by accident but I think more people with poor eyesight would use it if it was more commonly known, it also saves having to look down at the keyboard for the +/- keys (as I do :).

Thanks.
Thank you. I think that the best approach is, the default action of command+wheel is changed to zoom-in/out from scroll. That feels similar to other platform's Firefox. And user don't need to press two modifier keys. I'll post a patch.
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
See comment 10 for the reason.

I'm not sure if this needs ui-review and who is the best ui-reviewer.
Attachment #685587 - Flags: review?(smichaud)
Attachment #685587 - Flags: review?(bugs)
Comment on attachment 685587 [details] [diff] [review]
Patch

Sounds reasonable to me.
Attachment #685587 - Flags: review?(smichaud) → review+
Attachment #685587 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a2744f8a62f4

gavin: If you want to use command+wheel for zoom-in/out, change "mousewheel.with_meta.action" value to 3 in about:config".

Thank you.
Target Milestone: --- → mozilla20
Great, back to normal zooming! Thanks for your time and help, Masayuki.
https://hg.mozilla.org/mozilla-central/rev/a2744f8a62f4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Masayuki, this change causes the page to zoom when using COMMAND + trackpad scrolling on my MacBook Pro. Is this intended behavior?

I don't know of any other Mac apps that zoom on COMMAND + trackpad scrolling. Personally, I think this new behavior is jarring. <:)
(In reply to Chris Peterson (:cpeterson) from comment #16)
> Masayuki, this change causes the page to zoom when using COMMAND + trackpad
> scrolling on my MacBook Pro. Is this intended behavior?

Yes. On all other desktop platforms, we provide primary modifier+mouse wheel as shortcut for zoom in/out. I didn't know control+wheel isn't available on Mac due to the OS feature. So, I think that it's reasonable to make command+mouse wheel become a shortcut of zoom.

> I don't know of any other Mac apps that zoom on COMMAND + trackpad
> scrolling. Personally, I think this new behavior is jarring. <:)

Yeah, On mac, it seems that there is no common behavior for modifier+mouse wheel. If you have objection for the new setting with actual problems, let me know. If you just hate the new setting, please change the value in about:config.
A bit late but FYI I just noticed that changing the preference "Zoom using scroll wheel while holding Command" (instead of the default Control) in Mouse->System Preferences reconfigured the settings so that it's possible to zoom the text in Firefox using control-mouse (w/out the need for option). 

I was surprised to see that firefox (and camino) were affected by this change in the OS preferences while there was no effect in other apps. With the same Zoom-wheel-command preference enabled, option-wheel also allows history to be scrolled back and forth in FF.

It probably goes without saying but trying the above overrode the '3' setting in about:config.
Blocks: 819252
Duplicate of this bug: 830075
Nice Gavin!

For Mountain Lion, the setting is found at System Preferences>Accessibility>Zoom>Use scroll gesture with modifier keys to zoom: choose Command.

Ctrl+scroll gesture now works in Firefox 18.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.