Min: zooming problems on figma.com

Created on 18 Sep 2020  路  6Comments  路  Source: minbrowser/min

  • Min Version: 1.16.0
  • Operating system: Arch Linux KDE

Expected Behavior

figma.com handles all the zooming shortcuts that Min already has. so when i press "CTRL + =" it should be handled by Figma and not min. pressing CTRL + 0 should return to original zoom.

Actual Behavior

if i press "CTRL + =" website gets zoomed twice, once by Min and then by the website. or if you zoom in by mouse and press CTRL + 0 it wont return to original zoom.

To Reproduce

register on figma.com, create empty document, write a text to make zooming a bit more obvious. and then press ctrl + = and it will zoom too much.

bug

All 6 comments

Same problem, also ctrl + mouse wheel zoom browser ui with figma canvas.
https://github.com/minbrowser/min/blob/61429877560451ff7bd0c9928c918685ec70bdcd/js/webviewGestures.js#L162

It seems the browser catch events even if .preventDefault called on it.
Although in my case it would be enough to have the flag to completely disable page zoom using the mouse wheel and ctrl

The gesture issue turns out to be pretty easy to fix; done in e91143494c1b87a68e1d90e4c8674e8229eac9b5. The original keyboard issue is a lot harder; due to the way keyboard events are implemented, there isn't currently an easy way to tell whether a page has called preventDefault() from within the keyboard shortcut handlers.

You are right, despite the fact that my problem fits the issue title, it problems of a different nature requiring different fixes. Maybe I should start a separate issue about preventDefault ignoring?

@Akiyamka Your issue is fixed in the linked commit, it's actually the original issue here that still isn't fixed.

@PalmerAL, aweasome, thx!
I build the latest version with this patch, figma now works fine!

Your issue is fixed in the linked commit, it's actually the original issue here that still isn't fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whitelynx picture whitelynx  路  5Comments

jersonlatorre picture jersonlatorre  路  3Comments

abejfehr picture abejfehr  路  6Comments

achou11 picture achou11  路  3Comments

bjadel picture bjadel  路  5Comments