mainsail-crew / mainsail

Mainsail is the popular web interface for managing and controlling 3D printers with Klipper.
https://docs.mainsail.xyz
GNU General Public License v3.0
1.68k stars 349 forks source link

feat: Disable Zoom on Mobile #1830

Open Helvio88 opened 5 months ago

Helvio88 commented 5 months ago

The reason zooming should be disabled, is because double tapping buttons (e.g. moving an axis) causes zooming.

meteyou commented 5 months ago

Hey! Thx for your PR, but i cannot reproduce this issue on my phone. Which OS and browser do you use?

I think to disable scaleable ist the wrong way, because there are also some tablet users, which use the scale function.

Helvio88 commented 5 months ago

Hey there! I'm using Safari (Web App) on iPhone. I sometimes try to baby-step the Z axis using the buttons and the double-tapping zooms the page, which is undesirable.

Alternative solution (Global CSS):

* {
    touch-action: manipulation;
}

Docs: https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action#manipulation

meteyou commented 5 months ago

can you please specify the selector, that it only operates for buttons?

Helvio88 commented 5 months ago

I could, it would be button input[type="button"]

But you and I have different opinions on how wide this setting should be.

I would suggest this PR is closed and you accept the idea as a suggestion for improvement, and implement however it makes more sense to you.

Thank you for considering!

meteyou commented 5 months ago

i just don't want to "break" anyone else's workflow, but i understand your issue and am trying to fix it as best as possible.