mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-30 18:46:01 +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) { | 	function handleContentEdit(displayClass, editableClass, inputSelector) { | ||||||
| 		$('.posts-list').on('click', displayClass, function () { | 		$('.posts-list').on('click', displayClass, function () { | ||||||
| 			var el = $(this); | 			var el = $(this); | ||||||
| 			el.addClass('hidden'); |  | ||||||
| 			var inputEl = el.parent().find(editableClass); | 			var inputEl = el.parent().find(editableClass); | ||||||
|  | 			if (inputEl.length) { | ||||||
|  | 				el.addClass('hidden'); | ||||||
| 				inputEl.removeClass('hidden').find(inputSelector).focus(); | 				inputEl.removeClass('hidden').find(inputSelector).focus(); | ||||||
|  | 			} | ||||||
| 		}); | 		}); | ||||||
|  |  | ||||||
| 		$('.posts-list').on('blur', editableClass + ' ' + inputSelector, function () { | 		$('.posts-list').on('blur', editableClass + ' ' + inputSelector, function () { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user