Skip to content

Safari allows zooming #2330

@Lavodan

Description

@Lavodan

Describe the bug
On iOS browser, the option to allow zooming should be disabled to prevent visual bugs and softlocking the player, but safari seems to ignore this.

To Reproduce
Steps to reproduce the behavior:

  1. Open openfront.io
  2. Try to pinch to zoom
  3. you can zoom in

Expected behavior
you should not be able to zoom

Screenshots

Smartphone (please complete the following information):

  • Device: iPhone
  • OS: iOS10+ probably
  • Browser probably all

Solution
According to a stackoverflow post the solution is to overwrite gesturerestart

document.addEventListener('gesturestart', function (e) {
    e.preventDefault();
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Triage

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions