vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report] The max-height prop for v-card does not prevent contents from overflowing

Open Alex-Mastin opened this issue 7 years ago • 3 comments

Environment

Vuetify Version: 2.0.7 Vue Version: 2.6.10 Browsers: Chrome 76.0.3809.100 OS: Windows 10

Steps to reproduce

Add max-height to a v-card with several elements inside. Make sure the max-height is less than what is required to display all of the elements.

Expected Behavior

If elements would overflow the max-height, then it should scroll.

Actual Behavior

By specifying the max-height prop on a v-card, the height of the card is modified, but any elements inside the card do not appear affected and remain where they were as though the card's height did not change.

Reproduction Link

https://codepen.io/HeadAdmiral/pen/BaBKQQp

Alex-Mastin avatar Aug 15 '19 01:08 Alex-Mastin

Odd, this has gone on since it was introduced in like 1.2 (at least can reproduce it in 1.5). Available work around is to set overflow-y explicitly. This would be something upstream to v-sheet. Technically in your example, you would be better off setting that though on v-card-text as if you set overflow on the v-card you scroll all contents, including your fab and title. There's also a FR for adding overflow props to v-card so kinda in conflict as best approach to fix this.

@vuetifyjs/core-team whats your thoughts on this?

MajesticPotatoe avatar Aug 15 '19 02:08 MajesticPotatoe

Yeah, the workaround I came up with was to conditionally apply overflow-y: scroll to the v-card and then perform some logic to change the positioning of the fab from absolute to fixed depending on whether or not the number of items in the list would overflow the viewport. Works in a pinch for what I want it to do, but isn't ideal.

Alex-Mastin avatar Aug 15 '19 02:08 Alex-Mastin

Any updates on this?

dom-velloso avatar Mar 15 '20 14:03 dom-velloso