mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: don't toggle elements if there is no inputEl
This commit is contained in:
@@ -65,9 +65,11 @@ define('forum/post-queue', ['categorySelector'], function (categorySelector) {
|
||||
function handleContentEdit(displayClass, editableClass, inputSelector) {
|
||||
$('.posts-list').on('click', displayClass, function () {
|
||||
var el = $(this);
|
||||
el.addClass('hidden');
|
||||
var inputEl = el.parent().find(editableClass);
|
||||
inputEl.removeClass('hidden').find(inputSelector).focus();
|
||||
if (inputEl.length) {
|
||||
el.addClass('hidden');
|
||||
inputEl.removeClass('hidden').find(inputSelector).focus();
|
||||
}
|
||||
});
|
||||
|
||||
$('.posts-list').on('blur', editableClass + ' ' + inputSelector, function () {
|
||||
|
||||
Reference in New Issue
Block a user