Skip to content

Commit

Permalink
fix(menuable): don't account for app offset in fixed context
Browse files Browse the repository at this point in the history
fixes #13740
  • Loading branch information
KaelWD committed Jun 2, 2021
1 parent dee0d59 commit ec8fafa
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/vuetify/src/mixins/menuable/index.ts
Expand Up @@ -404,12 +404,14 @@ export default baseMixins.extend<options>().extend({

// Display and hide to get dimensions
this.sneakPeek(() => {
if (this.$refs.content && this.$refs.content.offsetParent) {
const offsetRect = this.getRoundedBoundedClientRect(this.$refs.content.offsetParent)

this.relativeYOffset = window.pageYOffset + offsetRect.top
dimensions.activator.top -= this.relativeYOffset
dimensions.activator.left -= window.pageXOffset + offsetRect.left
if (this.$refs.content) {
if (this.$refs.content.offsetParent) {
const offsetRect = this.getRoundedBoundedClientRect(this.$refs.content.offsetParent)

this.relativeYOffset = window.pageYOffset + offsetRect.top
dimensions.activator.top -= this.relativeYOffset
dimensions.activator.left -= window.pageXOffset + offsetRect.left
}

dimensions.content = this.measure(this.$refs.content)
}
Expand Down

0 comments on commit ec8fafa

Please sign in to comment.