Disable scrolling on image resize on Mobile view

Posted about 5 years ago by Mihai Banu

Post a topic
Answered
M
Mihai Banu

Hello guys, 


I have a bounding box where an image can be uploaded. Once the image is uploaded it can be resized.


If you try to resize it on mobile view (tested on iPhone X and iPhone 7) the screen scrolls up and down as you zoom in or out.


Any idea on how to disable the scrolling once the resize button is clicked? 


I tried something like this with jquery but with no luck:


```

 

let blockMenuHeaderScroll = false;

$(window).on('touchstart', (e) => {

if ($(e.target).closest('#fpd').length === 1) {

blockMenuHeaderScroll = true;

}

});

$(window).on('touchend', () => {

blockMenuHeaderScroll = false;

});

$(window).on('touchmove', (e) => {

if (blockMenuHeaderScroll) {

e.preventDefault();

}

});`

```

0 Votes

rady kal

rady kal posted about 5 years ago Admin Best Answer

Please open a support ticket so we can have a closer look at this.

0 Votes


1 Comments

rady kal

rady kal posted about 5 years ago Admin Answer

Please open a support ticket so we can have a closer look at this.

0 Votes

Login or Sign up to post a comment