mirror of
https://github.com/flarum/framework.git
synced 2025-04-25 14:14:03 +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(
|
$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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user