Skip to content

fix(VFileInput): show drag feedback for file drops#22909

Open
mahsarajabpour wants to merge 2 commits into
vuetifyjs:masterfrom
mahsarajabpour:fix/v-file-input-drag-feedback
Open

fix(VFileInput): show drag feedback for file drops#22909
mahsarajabpour wants to merge 2 commits into
vuetifyjs:masterfrom
mahsarajabpour:fix/v-file-input-drag-feedback

Conversation

@mahsarajabpour

@mahsarajabpour mahsarajabpour commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #20576.

This improves drag-and-drop feedback in v-file-input.

The dragging state is now properly cleared when a file drag leaves the input, preventing the state from becoming stuck.

The previous feedback effect produced inconsistent results across variants (filled, solo-filled, and solo-inverted) and depended on the primary theme color. It has been replaced with a simple dashed outline that provides consistent drag feedback across variants and themes.

Tests were updated to cover drag state cleanup and drag feedback behavior.

Markup

<template>
  <v-sheet class="mb-8 pa-6" border rounded>
    <h2 class="text-h6 mb-4">
      VFileInput drag feedback test
    </h2>

    <v-row>
      <v-col v-for="variant in ['outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled']" :key="variant" cols="12"
             md="6">
        <v-file-input
          :label="variant"
          :variant="variant"
          multiple
        />
      </v-col>
    </v-row>
  </v-sheet>
</template>
<script setup lang="ts">
</script>

@J-Sek J-Sek force-pushed the fix/v-file-input-drag-feedback branch from b5295b1 to 1b2007a Compare June 8, 2026 08:07
@J-Sek

J-Sek commented Jun 8, 2026

Copy link
Copy Markdown
Contributor
  • when dragging, leaving to the side - the dragging state is stuck
  • the effect could is almost not visible for the filled variant, solo-inverted flashes solid color, solo-filled does not respond at all
  • we cannot use primary theme color here

I wonder if replacing the effect with simple dashed outline would help work around some of the problems.

BTW. PR needs some playground so we can easily paste it locally to dev/Playground.vue for verification.

@mahsarajabpour mahsarajabpour force-pushed the fix/v-file-input-drag-feedback branch from 1b2007a to 3a53043 Compare June 13, 2026 04:59
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.

[Feature Request] Add Drag and Drop Visual Feedback to v-file-input Component.

2 participants