Skip to content

Commit

Permalink
fix(VDialog/VMenu/VTooltip): hide wrapper element when not attached (#…
Browse files Browse the repository at this point in the history
…9163)

* fix(VDialog/VMenu/VTooltip): hide wrapper element when not attached

fixes #6951

* fix(VTooltip): correct class name

Co-Authored-By: Daan Roet <DRoet@users.noreply.github.com>
  • Loading branch information
2 people authored and johnleider committed Oct 1, 2019
1 parent 1e62a4e commit 5a100ac
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
11 changes: 4 additions & 7 deletions packages/vuetify/src/components/VDialog/VDialog.sass
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@
z-index: 6
outline: none

.v-dialog__activator
cursor: pointer

*
cursor: pointer

.v-dialog__container
display: inline
display: none

&--attached
display: inline

// Modifier
.v-dialog--animated
Expand Down
6 changes: 6 additions & 0 deletions packages/vuetify/src/components/VDialog/VDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ export default baseMixins.extend({

return h('div', {
staticClass: 'v-dialog__container',
class: {
'v-dialog__container--attached':
this.attach === '' ||
this.attach === true ||
this.attach === 'attach',
},
attrs: { role: 'dialog' },
}, children)
},
Expand Down
11 changes: 3 additions & 8 deletions packages/vuetify/src/components/VMenu/VMenu.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
@import './_variables.scss'

.v-menu
display: inline
display: none

&__activator
align-items: center
cursor: pointer
display: flex

*
cursor: pointer
&--attached
display: inline

&__content
position: absolute
Expand Down
6 changes: 6 additions & 0 deletions packages/vuetify/src/components/VMenu/VMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ export default baseMixins.extend({
render (h): VNode {
const data = {
staticClass: 'v-menu',
class: {
'v-menu--attached':
this.attach === '' ||
this.attach === true ||
this.attach === 'attach',
},
directives: [{
arg: '500',
name: 'resize',
Expand Down
7 changes: 5 additions & 2 deletions packages/vuetify/src/components/VTooltip/VTooltip.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
@import ./_variables

.v-tooltip
display: inline
display: none

&--attached
display: inline

&__content
background: $tooltip-background-color
Expand All @@ -17,7 +20,7 @@
width: auto
opacity: 1
pointer-events: none

&--fixed
position: fixed

Expand Down
4 changes: 4 additions & 0 deletions packages/vuetify/src/components/VTooltip/VTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export default mixins(Colorable, Delayable, Dependent, Detachable, Menuable, Tog
'v-tooltip--right': this.right,
'v-tooltip--bottom': this.bottom,
'v-tooltip--left': this.left,
'v-tooltip--attached':
this.attach === '' ||
this.attach === true ||
this.attach === 'attach',
}
},
computedTransition (): string {
Expand Down

0 comments on commit 5a100ac

Please sign in to comment.