Browse Source

Fix Ctrl/Cmd+F always processed by the asset library, instead of script editor / help.

bruvzg 2 years ago
parent
commit
f6adf07ffa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/plugins/asset_library_editor_plugin.cpp

+ 1 - 1
editor/plugins/asset_library_editor_plugin.cpp

@@ -648,7 +648,7 @@ void EditorAssetLibrary::shortcut_input(const Ref<InputEvent> &p_event) {
 	const Ref<InputEventKey> key = p_event;
 	const Ref<InputEventKey> key = p_event;
 
 
 	if (key.is_valid() && key->is_pressed()) {
 	if (key.is_valid() && key->is_pressed()) {
-		if (key->is_match(InputEventKey::create_reference(KeyModifierMask::CMD_OR_CTRL | Key::F))) {
+		if (key->is_match(InputEventKey::create_reference(KeyModifierMask::CMD_OR_CTRL | Key::F)) && is_visible_in_tree()) {
 			filter->grab_focus();
 			filter->grab_focus();
 			filter->select_all();
 			filter->select_all();
 			accept_event();
 			accept_event();