@remotion/studio: Preselect filename stem in rename dialog#8327
Merged
JonnyBurger merged 2 commits intoJun 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — this PR preselects the filename stem (or full input text) in Studio rename dialogs so users can immediately type to replace it, fixing #8318.
RenameStaticFile.tsx— on mount, selects the filename stem viasetSelectionRange(0, stemEnd), leaving the extension (e.g.,.mp4) unselected.RenameComposition.tsx— on mount, selects all text viainput.select()since composition IDs carry no extension.RenameFolder.tsx— sameinput.select()treatment as composition rename, since folder names have no extension.
RemotionInput forwards its ref to an underlying <input> element (RemInput.tsx:119), so the DOM selection APIs work correctly.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
@remotion/studio: Preselect filename stem in rename dialog
Member
|
Thank you! |
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 does this fix?
Fixes #8318
The rename dialog does not pre-select the filename correctly when it opens. The user has to manually position the cursor before editing.
What did I change?
setSelectionRange(0, stemEnd)wherestemEndis the index of the last dot (or the full length if there is no dot). This selectsmy-videoand leaves.mp4unselected.input.select()on mount since folder names and composition IDs carry no extension.How to verify
my-videohighlighted (notmy-video.mp4)..mp4is preserved unchanged.