Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert workaround for popper glitch, fix regression #1685

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 1 addition & 38 deletions src/components/Popover/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ With a `<button>` as a trigger:
<template>
<VPopover
v-bind="$attrs"
:popover-base-class="doShowMenu ? 'popover' : 'popover popover__hidden'"
popover-base-class="popover"
popover-wrapper-class="popover__wrapper"
popover-arrow-class="popover__arrow"
popover-inner-class="popover__inner"
Expand All @@ -74,34 +74,6 @@ export default {
components: {
VPopover,
},
props: {
open: {
type: Boolean,
default: false,
},
},
data() {
return {
doShowMenu: false,
}
},

watch: {
open(newValue) {
if (newValue === true) {
// show with delay to allow position calculation to happen for dynamic contents,
// otherwise the popover will appear in the wrong place first and be visible,
// and then in the next tick it repositions itself
// Note: we can't use this.$nextTick here as it happens too early before
// v-tooltip's position calculation happens
window.setTimeout(() => {
this.doShowMenu = newValue
}, 2)
} else {
this.doShowMenu = false
}
},
},
}
</script>

Expand All @@ -114,15 +86,6 @@ $arrow-width: 10px;

filter: drop-shadow(0 1px 10px var(--color-box-shadow));

&__hidden {
/* same as visibility-hidden but keep the size to avoid resizes on show */
/* !important is here to override inline styles set by v-tooltip for initial show */
visibility: hidden !important;
left: -10000px !important;
top: auto !important;
transform: transform3d(-10000, -10000, 0) !important;
}

&__inner {
padding: 0;
color: var(--color-main-text);
Expand Down