Repository navigation
Conversation
Member
Did you write the code yourself? Please see our guidelines |
KoBeWi
reviewed
Nov 26, 2026
| void FindInFiles::open_dock(const String &p_initial_text, bool p_replace) { | ||
| FindInFilesSearchPanel *search_control = container->get_search_control(); | ||
| EditorDockManager::get_singleton()->focus_dock(container); | ||
| if (container->is_visible_in_tree() && !container->get_window()->has_focus()) { |
Member
There was a problem hiding this comment.
That's not right, the dock should never have to manually focus its window. focus_dock() already does this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem(s) does this PR solve?
Closes #125832.
When Find in Files opens from a floating Script window, the Find field can have control focus while the floating window still receives keyboard input. After showing the dock, request focus for its containing window if the dock is visible and that window is not already focused. Find in Files and Replace in Files share this entry point.
Validation
On macOS 26.7.3 (Apple M3 Pro, single display, Forward+ / Metal), I reproduced the issue on 4.8 beta 5 (reproduction and screenshots). With a local arm64 editor build from
8f2e46bcaplus this patch, I focused the floating Script window and ran both shortcuts:Cmd+Shift+F): typingspeedimmediately populated the Find field and returned two matches.Cmd+Shift+R): typingplayerimmediately populated the Find field with Replace enabled and returned two matches.Codex assisted with tracing the focus path, drafting the patch, and automating the macOS reproduction and verification.