Ensure post mention previews are clickable on mobile

This commit is contained in:
Toby Zerner 2015-07-28 18:36:53 +09:30
parent 7f05f8ab22
commit e82a50c5d7

View File

@ -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);
});
});