Closed j1mie closed 2 years ago
Could you please create a demo to show this issue?
This happens when called a next line:
And you can overwrite this behavior As a workaround https://codesandbox.io/s/naughty-kepler-qxbj4
import QuickPinchZoom from "react-quick-pinch-zoom";
class MyQuickPinchZoom extends QuickPinchZoom {
simulate(fn) {
return mouseEvent => {
const { pageX, pageY, type } = mouseEvent;
const isEnd = type === "mouseup";
const isStart = type === "mousedown";
if (isStart) {
// FIXME: To have able focus elemnts
// mouseEvent.preventDefault();
this._listenMouseMove = true;
}
if (this._listenMouseMove) {
mouseEvent.touches = isEnd ? [] : [{ pageX, pageY }];
fn(mouseEvent);
}
if (isEnd) {
this._listenMouseMove = false;
}
};
}
}
// .................
<MyQuickPinchZoom
...
/>
Hi there, I'm wondering if it's possible to focus child components, using this library?
Currently, I'm unable to focus by clicking any element within
QuickPinchZoom
.