Skip to content

Is there possible simulate pinch to zoom event to get window.visualViewport.zoom === 1? #30

@rkrejcii

Description

@rkrejcii

Hello,

I'm maintaining a popup proprietary library which has following problem in Mobile Safari (iOS): When user rotates the device, the view starts zooming automatically, with every rotation the zoom multiplies. That's perhaps related to the fact that the page has different viewport meta tag setup for portrait and landscape orientation, but that's a part of code I don't want to touch.

Instead of it I was thinking that I can trigger programatically pinch to zoom event, so

if (window.visualViewport.zoom > 1) {
  /* Simulate pinch to zoom event which sets zoom back to 1 */
}

Is there please any way how to do that?

Thank you very much for every hint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions