Skip to content

Codex/issue 2430 clear focus#2445

Open
SarthakDudhe wants to merge 4 commits into
beautifier:mainfrom
SarthakDudhe:codex/issue-2430-clear-focus
Open

Codex/issue 2430 clear focus#2445
SarthakDudhe wants to merge 4 commits into
beautifier:mainfrom
SarthakDudhe:codex/issue-2430-clear-focus

Conversation

@SarthakDudhe
Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant