react-native-signature-canvas icon indicating copy to clipboard operation
react-native-signature-canvas copied to clipboard

LongPres disable

Open ciaoamigoschat opened this issue 3 years ago • 3 comments

On ipad device. When I press the area and hold it down, a magnifying glass appears. How do I disable / hide the lens.

ciaoamigoschat avatar Apr 28 '22 08:04 ciaoamigoschat

I am facing the same situation here.

KittipochSae avatar Feb 01 '23 19:02 KittipochSae

Having the same issue here, I guess it is related to the OS, for me it's iOS, I noticed the same behavior on any other web page in safari, but if anyone can find a workaround I'd appreciate it

HinJean avatar Mar 14 '23 15:03 HinJean

I got the solution for this problem. The problem is caused by the incompatible events pointerup, pointermove, pointerdown SignaturePad.prototype._handlePointerEvents in h5/js/signature_pad.js. The problem can be solved by forcing use event touchstart, touchmove, touchend.

Here is the example of the solution:

SignaturePad.prototype._handlePointerEvents = function () {
    this.canvas.addEventListener('touchstart', this._handleTouchStart);
    this.canvas.addEventListener('touchmove', this._handleTouchMove);
    this.canvas.addEventListener('touchend', this._handleTouchEnd);
};

The app will treat the stylus input as touch input without the problem. However, the manify glass may persist but the input will still work just fine.

KittipochSae avatar Mar 15 '23 15:03 KittipochSae