mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: tooltip
This commit is contained in:
@@ -486,7 +486,7 @@ define('forum/topic/postTools', [
|
||||
|
||||
if (!selectionTooltip.length) {
|
||||
selectionTooltip = await app.parseAndTranslate('partials/topic/selection-tooltip', ajaxify.data);
|
||||
selectionTooltip.appendTo('body');
|
||||
selectionTooltip.addClass('hidden').appendTo('body');
|
||||
}
|
||||
selectionTooltip.off('click').on('click', '[component="selection/tooltip/quote"]', function () {
|
||||
selectionTooltip.addClass('hidden');
|
||||
@@ -509,14 +509,10 @@ define('forum/topic/postTools', [
|
||||
hooks.onPage('action:posts.loaded', function () {
|
||||
setTimeout(updateTooltip, 0);
|
||||
});
|
||||
$(document).off('selectionchange', hideTooltip).on('selectionchange', hideTooltip);
|
||||
postContainer.on('mouseup', updateTooltip);
|
||||
}
|
||||
|
||||
function hideTooltip() {
|
||||
if (ajaxify.data.template.topic) {
|
||||
$('[component="selection/tooltip"]').addClass('hidden');
|
||||
}
|
||||
postContainer.on('mouseup', function () {
|
||||
setTimeout(updateTooltip, 0);
|
||||
});
|
||||
}
|
||||
|
||||
return PostTools;
|
||||
|
||||
Reference in New Issue
Block a user