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