[Bug Report] Incorrect tooltip behavior with some components
See original GitHub issueEnvironment
Vuetify Version: 2.0.7 Vue Version: 2.6.10 Browsers: Chrome 76.0.3809.100 OS: Linux x86_64
Steps to reproduce
- add a Vuetify component which would make sense with a tooltip, like
v-select
orv-fileinput
- wrap it in a
<v-tooltip>
to add a tooltip - hover on the component
Expected Behavior
The tooltip should appear on hover
Actual Behavior
For some components, the tooltip does not appear, or incorrectly (see comments)
Reproduction Link
https://codepen.io/tomparle/pen/ymKGxp
Other comments
I have only tested components that would make sense with a tooltip, excluding core or abstract components such as v-app, v-bottom-sheet or v-divider. When a component is OK, then the tooltip works properly. When NOK, the tooltip usually just does not appear on hover.
Alert : NOK Avatar : OK Badge : NOK Banner : NOK Button : OK Card : OK Chip : OK Icon : OK Image : OK
— Form components — Autocomplete : OK Combobox : OK FileInput : NOK (only appears briefly on click, then disappears because of the file input dialog displayed instead.The tooltip should appear on hover instead) Overflow buttons : OK Select : NOK (appears on click then disappears, instead of hover) Checkbox : NOK (the tooltip is working only on the checkbox itself but not on its label as I would expect) Radio button : NOK (tooltip working only on the radio circle but not on its label) Switch : NOK (working on the slider but not on its label) Slider : NOK (tooltip appears when clicking on the slider, instead of hovering) TextArea : OK TextField : OK
Progress circular : OK Progress Linear : OK, but slight bottom offset where tooltip does not appear if hovering on the very bottom of the progress bar (more visible with a large height) Rating : NOK Sheet : OK Sparkline : NOK (suggestion : it may appear when hovering the line itself) Tabs : OK Timeline item : NOK (it may appear when hovering the timeline item dot)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:13 (4 by maintainers)
Top GitHub Comments
I want to put in a plug for addressing this issue. It’s really bad to say “there’s a workaround” when potentially thousands of developers run into the sames issues over and over, and have to spend thousands of hours googling. Not to mention the importance of consistency in a code base. That also saves a ton of time as some other developer looking at the workaround doesn’t need to wonder “why does this code look weird?”.
I solved this bug adding
v-slot:activator="{ on, attrs }
in<template>
, add adiv
tag withv-on="on"
into<template>
then add<v-select>
intodiv
.However, if it is not the best implementation reply this.
Forked: https://codepen.io/domicoder/pen/MWowBNb
It’s working.