mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
improve prev hack
This commit is contained in:
@@ -68,16 +68,10 @@ function cancelDrag(e, onDrag) {
|
|||||||
WidgetClickHook.setupDocumentCallback = function() {
|
WidgetClickHook.setupDocumentCallback = function() {
|
||||||
if (_watchingDocument) { return; }
|
if (_watchingDocument) { return; }
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('touchmove', e => {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
}, { passive: false, capture: true });
|
|
||||||
|
|
||||||
let widget;
|
let widget;
|
||||||
let onDrag = dragE => {
|
let onDrag = dragE => {
|
||||||
const tt = dragE.targetTouches[0];
|
const tt = dragE.targetTouches[0];
|
||||||
if (tt) {
|
if (tt && widget) {
|
||||||
dragE.preventDefault();
|
dragE.preventDefault();
|
||||||
dragE.stopPropagation();
|
dragE.stopPropagation();
|
||||||
widget.drag(tt);
|
widget.drag(tt);
|
||||||
|
|||||||
Reference in New Issue
Block a user