https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/pointerdown_event
Hello! I have successfully implemented code for a long click, however, the pointer event api is not fully supported in Safari as it is still under development.
Is there a simple workaround that can be applied specifically for Safari? If not, is there another event that can be used instead? I've attempted to use 'mousedown/mouseup' but with no success.
The following code works with "touchstart/touchend" and also "pointerdown/pointerup", but unfortunately, they do not have comprehensive browser support:
let pressTimer;
this.myDocsums.on('touchend', () => {
clearTimeout(pressTimer);
}).on('touchstart', (e) => {
let startY = window.pageYOffset;
let docsum = $(e.currentTarget);
let selectorInput = docsum.find('.selector-input');
pressTimer = window.setTimeout(() => {
let endY = window.pageYOffset;
if (startY == endY) {
selectorInput.trigger('click');
}
}, 750)
});