Repository navigation
fix(VFileInput): respect form state on drop and paste - #23430
Merged
J-Sek merged 1 commit intoNov 24, 2026
Merged
Conversation
The drag, drop and paste handlers only checked the field's own disabled and readonly props, so a VFileInput inside a readonly or disabled VForm still accepted dropped and pasted files. Use the form state from useForm, as VFileUpload already does.
J-Sek
approved these changes
Nov 24, 2026
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.
Description
A
v-file-inputinside<v-form readonly>still accepts dropped and pasted files, and highlights itself while a file is dragged over it. The same field with its ownreadonlyignores them. For example, this view/edit dialog relies on the form to make every input read-only, but dropping a certificate onto its file input in view mode still replaces the model. Here's a playground: drop a file on both fields, only B picks it up.The drag, drop and paste handlers only looked at
props.disabledandprops.readonly. I switched them to the form state fromuseForm, the same wayVFileUploaddoes it and the select inputs do since #23375. Withdisabledthe browser already stops real drops and pastes, so the visible change is forreadonly.Markup: