Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom in/out with CMD on Mac #4993

Closed
weblocs opened this issue Jul 6, 2021 · 3 comments
Closed

Zoom in/out with CMD on Mac #4993

weblocs opened this issue Jul 6, 2021 · 3 comments
Labels
help wanted External contributions actively solicited issue: bug Describes why the code or behaviour is wrong

Comments

@weblocs
Copy link

weblocs commented Jul 6, 2021

Using JS code:

Blockly.inject(element, {
zoom: {
wheel: true,
},
move: {
scrollbars: true,
drag: true,
wheel: true,
},
});

we can zoom in/out on CTRL, but it doesn't work on CMD on Macs.

@weblocs weblocs added issue: triage Issues awaiting triage by a Blockly team member issue: bug Describes why the code or behaviour is wrong labels Jul 6, 2021
@moniika moniika added this to the Needs discussion milestone Jul 7, 2021
@moniika moniika added needs more info Waiting for developer response and removed issue: triage Issues awaiting triage by a Blockly team member labels Jul 7, 2021
@moniika moniika removed the needs more info Waiting for developer response label Jul 7, 2021
@moniika
Copy link
Contributor

moniika commented Jul 7, 2021

Thanks @alschmiedt for pointing out this line of code:

if (canWheelZoom && (e.ctrlKey || !canWheelMove)) {

On MacOS, it is unexpected behavior for CMD to not work for zooming in/out, especially because it works if you don't set the wheel: true option in inject.

@gonzalotudela-hub
Copy link

Another data point for reference - Figma and Miro use CMD + Mouse Wheel for zooming.

It's been a while since I've used Photoshop, but I'm pretty sure it's the same.

@BeksOmega
Copy link
Collaborator

Fixed by #5419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted External contributions actively solicited issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

4 participants