Skip to content

fix(VTextField): forward title attribute to root element#22779

Closed
hellozzm wants to merge 1 commit intovuetifyjs:masterfrom
hellozzm:fix/issue-22730
Closed

fix(VTextField): forward title attribute to root element#22779
hellozzm wants to merge 1 commit intovuetifyjs:masterfrom
hellozzm:fix/issue-22730

Conversation

@hellozzm
Copy link
Copy Markdown

Summary

The title HTML attribute was being routed to the <input> element via inputAttrs in filterInputAttrs. For VSelect, the actual <input> is hidden, so the title tooltip never appears on hover.

This fix adds title to the rootAttrs pick list in filterInputAttrs, so it gets applied to the root element where it can function as a native browser tooltip.

Playground Markup

<template>
  <v-app>
    <v-container style="max-width: 400px">
      <v-select
        label="Select a fruit"
        title="Hover over me to see this tooltip"
        :items="["Apple", "Banana", "Cherry"]"
      ></v-select>
      
      <v-text-field
        label="Text field"
        title="This also has a title tooltip"
        model-value="Hello"
      ></v-text-field>
    </v-container>
  </v-app>
</template>

<script setup>
</script>

Testing

  1. Open the playground above
  2. Hover over the VSelect component (not the dropdown, the closed state)
  3. A native browser tooltip should appear saying "Hover over me to see this tooltip"
  4. Hover over the VTextField - tooltip should also appear
  5. Before fix: no tooltip appeared on VSelect

Fixes #22730

The title HTML attribute was being filtered into inputAttrs and applied
to the hidden input element in VSelect, making it invisible to users.
This fix adds title to the rootAttrs list in filterInputAttrs so it is
applied to the root element where it can function as a tooltip.

Fixes vuetifyjs#22730
@J-Sek
Copy link
Copy Markdown
Contributor

J-Sek commented Mar 29, 2026

You did not even bother to look at already opened PR

@J-Sek J-Sek closed this Mar 29, 2026
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.

[Bug Report][4.0.2] title attribute does not work on V-Select

2 participants