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