react-zoom-pan-pinch icon indicating copy to clipboard operation
react-zoom-pan-pinch copied to clipboard

Scrolling in mobile

Open gabifuse opened this issue 1 year ago • 4 comments

Hello!

I have the following structure


		<div style={{ height: '100px', width: '300px', overflowY: 'auto', overflowX: 'hidden', background: 'red' }}>
			<TransformWrapper wheel={{ wheelDisabled: true }} panning={{ velocityDisabled: true }} ref={transformComponentRef}>
				{(): JSX.Element => (
					<TransformComponent
						contentStyle={{ height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }}
						wrapperStyle={{ display: 'flex', flexDirection: 'column', overflow: 'hidden' }}
					>
						<div style={{ height: '200px', width: '300px', background: 'blue', color: 'white' }}>test</div>
					</TransformComponent>
				)}
			</TransformWrapper>
		</div>

I want to allow only zooming and when clicking on a button to use the ref and get the zoom back to the initial (this part works perfectly). The problem starts on mobile devices where the native scroll of the user seems to not be working and i cant scroll past the first 100px, even though on desktop scrolling works fine. any idea on why this is and how can i get it to work?

Thanks in advance, Gabi.

gabifuse avatar Nov 08 '23 14:11 gabifuse

I have this same issue. Did you find a resolution?

SeanBarker182 avatar Jan 09 '24 01:01 SeanBarker182

any solution?

wilderPariona avatar Mar 12 '24 17:03 wilderPariona

same problem

ekunitsa avatar Apr 26 '24 08:04 ekunitsa

any solution on this?

Logan-FE avatar Aug 26 '24 05:08 Logan-FE