Codex/issue 2430 clear focus#2445
Open
SarthakDudhe wants to merge 4 commits into
Open
Conversation
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.
This change fixes the Clear button behavior in the web UI by restoring input focus immediately after the editor is cleared. Before this update, clicking Clear would empty the CodeMirror editor or plain textarea, but the focus stayed on the button, so the user had to click back into the input area before typing again. Now clearAll() explicitly calls the.editor.focus() for the CodeMirror path and $('#source').focus() for the textarea path, which makes the caret reappear right away and keeps the workflow smooth. The change is limited to web/common-function.js and does not affect beautifier logic or output formatting.