mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 01:37:26 +00:00
Preventing zoom in iOS Safari. (#395)
This commit is contained in:
@@ -62,6 +62,14 @@ export default class App extends Component<Props, State> {
|
||||
};
|
||||
}
|
||||
|
||||
// Since iOS 10, Apple tries to prevent disabling pinch-zoom. This is great in theory, but
|
||||
// really breaks things on Squoosh, as you can easily end up zooming the UI when you mean to
|
||||
// zoom the image. Once you've done this, it's really difficult to undo. Anyway, this seems to
|
||||
// prevent it.
|
||||
document.body.addEventListener('gesturestart', (event) => {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
window.addEventListener('popstate', this.onPopState);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user