mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 09:25:45 +01:00
fix: closes #11673, topic search for harmony
harmony uses dropdown for search persona and older themes used a hidden input element in the navbar
This commit is contained in:
@@ -84,7 +84,10 @@ define('forum/topic', [
|
||||
require(['search'], function (search) {
|
||||
mousetrap.bind(['command+f', 'ctrl+f'], function (e) {
|
||||
e.preventDefault();
|
||||
const form = $('[component="navbar"] [component="search/form"]');
|
||||
let form = $('[component="navbar"] [component="search/form"]');
|
||||
if (!form.length) { // harmony
|
||||
form = $('[component="sidebar/right"] [component="search/form"]');
|
||||
}
|
||||
form.find('[component="search/fields"] input[name="query"]').val('in:topic-' + ajaxify.data.tid + ' ');
|
||||
search.showAndFocusInput(form);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user