mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +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;
|
||||
}
|
||||
|
||||
$('#plugin-search').val('');
|
||||
const searchInputEl = document.querySelector('#plugin-search');
|
||||
searchInputEl.value = '';
|
||||
|
||||
pluginsList.on('click', 'button[data-action="toggleActive"]', function () {
|
||||
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();
|
||||
$('.plugins li').each(function () {
|
||||
var pluginId = $(this).attr('data-plugin-id');
|
||||
@@ -226,6 +227,7 @@ define('admin/extend/plugins', [
|
||||
|
||||
populateUpgradeablePlugins();
|
||||
populateActivePlugins();
|
||||
searchInputEl.focus();
|
||||
};
|
||||
|
||||
function confirmInstall(pluginID, callback) {
|
||||
|
||||
Reference in New Issue
Block a user