vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report] V-text-field with properties 'outlined' and 'icon' override the Label

Open edeuxk opened this issue 7 years ago • 4 comments

Environment

Vuetify Version: 2.0.3 Last working version: 1.5.16 Vue Version: 2.6.10 Browsers: Chrome 75.0.3770.142 OS: Windows 10

Steps to reproduce

Use v-stepper and within it try to insert a v-text-field with a prepend-inner-icon="place" outlined. Then, the label will not work

Expected Behavior

The label should not be erased by the line image

Actual Behavior

It's working but the line erase the label and it's not clean. image

Reproduction Link

https://codepen.io/edeuxk/pen/BXRKwW

edeuxk avatar Jul 30 '19 20:07 edeuxk

Duplicate of #7470

KaelWD avatar Jul 31 '19 01:07 KaelWD

@KaelWD I tried your solution for the past 2 hours and my conclusion is that it can not be a fix for a v-stepper.

If I change my icon from "prepend-inner-icon" to "append-icon" it works perfectly. Or if I remove my icon, it works perfectly too.

"prepend-inner-icon": image

"append-icon": image

I tried the :key solution, but it only works for the 1st step-content and not the others steps.

Please consider this issue because in the vuetify 1.5 it was working

edeuxk avatar Jul 31 '19 05:07 edeuxk

still does this with a outlined text input with a label and prepend inner icon. I don't use prepend inner icon anymore.

wendelicious avatar Dec 12 '19 06:12 wendelicious

The problem arises when the icon comes from a webfont - the width of the "prepend-inner" slot is calculated in vuetify/lib/components/VTextField/VTextField.js at function setPrependWidth(). But this function is called before the browser has completed loading the webfont - so we get wrong width which is not updated unless the browser window is resized. To properly fix the issue, we need to setup a ResizeObserver on the prepend-inner slot - but a simpler fix is to just call onResize() inside onFocus() so that even if the label has a wrong offset initially, it will be corrected as soon as the input is focused. The patch is attached. vuetify#2.4.6.patch.txt

tmcdos avatar Apr 10 '21 12:04 tmcdos