From e1c05e59c9182b0b846e2d271232304e196ddfa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 24 Jun 2019 09:59:31 -0400 Subject: [PATCH] fix: restrict drag drop to pin icon, closes #7702 https://github.com/NodeBB/NodeBB/issues/6081 --- public/src/client/category/tools.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/client/category/tools.js b/public/src/client/category/tools.js index ae0358d966..cdef7ea6d0 100644 --- a/public/src/client/category/tools.js +++ b/public/src/client/category/tools.js @@ -254,8 +254,7 @@ define('forum/category/tools', [ } function handlePinnedTopicSort() { - var env = utils.findBootstrapEnvironment(); - if (!ajaxify.data.privileges.isAdminOrMod || env === 'xs' || env === 'sm') { + if (!ajaxify.data.privileges.isAdminOrMod) { return; } app.loadJQueryUI(function () { @@ -263,6 +262,7 @@ define('forum/category/tools', [ return !$(e).parents('[widget-area]').length; }); topicListEl.sortable({ + handle: '[component="topic/pinned"]', items: '[component="category/topic"].pinned', update: function () { var data = [];