mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	fix: autofocus on search field in ACP > Manage > Plugins
This commit is contained in:
		| @@ -19,7 +19,8 @@ define('admin/extend/plugins', [ | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$('#plugin-search').val(''); | 		const searchInputEl = document.querySelector('#plugin-search'); | ||||||
|  | 		searchInputEl.value = ''; | ||||||
|  |  | ||||||
| 		pluginsList.on('click', 'button[data-action="toggleActive"]', function () { | 		pluginsList.on('click', 'button[data-action="toggleActive"]', function () { | ||||||
| 			var pluginEl = $(this).parents('li'); | 			var pluginEl = $(this).parents('li'); | ||||||
| @@ -147,7 +148,7 @@ define('admin/extend/plugins', [ | |||||||
| 			}); | 			}); | ||||||
| 		}); | 		}); | ||||||
|  |  | ||||||
| 		$('#plugin-search').on('input propertychange', function () { | 		$(searchInputEl).on('input propertychange', function () { | ||||||
| 			var term = $(this).val(); | 			var term = $(this).val(); | ||||||
| 			$('.plugins li').each(function () { | 			$('.plugins li').each(function () { | ||||||
| 				var pluginId = $(this).attr('data-plugin-id'); | 				var pluginId = $(this).attr('data-plugin-id'); | ||||||
| @@ -226,6 +227,7 @@ define('admin/extend/plugins', [ | |||||||
|  |  | ||||||
| 		populateUpgradeablePlugins(); | 		populateUpgradeablePlugins(); | ||||||
| 		populateActivePlugins(); | 		populateActivePlugins(); | ||||||
|  | 		searchInputEl.focus(); | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| 	function confirmInstall(pluginID, callback) { | 	function confirmInstall(pluginID, callback) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user