mirror of
https://github.com/flarum/core.git
synced 2025-08-04 15:37:51 +02:00
Ensure post mention previews are clickable on mobile
This commit is contained in:
@@ -83,6 +83,8 @@ export default function addPostMentionPreviews() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$this.on('touchstart', e => e.preventDefault());
|
||||||
|
|
||||||
$this.parent().hover(
|
$this.parent().hover(
|
||||||
() => {
|
() => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
@@ -94,11 +96,11 @@ export default function addPostMentionPreviews() {
|
|||||||
timeout = setTimeout(hidePreview, 250);
|
timeout = setTimeout(hidePreview, 250);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.on('touchstart', e => e.preventDefault())
|
|
||||||
.on('touchend', e => {
|
.on('touchend', e => {
|
||||||
showPreview();
|
showPreview();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('touchend', hidePreview);
|
$(document).on('touchend', hidePreview);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user