aboutsummaryrefslogtreecommitdiff
path: root/src/components/popover
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/popover')
-rw-r--r--src/components/popover/popover.js7
-rw-r--r--src/components/popover/popover.vue1
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js
index 5e417fa0..bfe39212 100644
--- a/src/components/popover/popover.js
+++ b/src/components/popover/popover.js
@@ -121,9 +121,12 @@ const Popover = {
}
},
showPopover () {
- if (this.hidden) this.$emit('show')
+ const wasHidden = this.hidden
this.hidden = false
- this.$nextTick(this.updateStyles)
+ this.$nextTick(() => {
+ if (wasHidden) this.$emit('show')
+ this.updateStyles()
+ })
},
hidePopover () {
if (!this.hidden) this.$emit('close')
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index 2252c68f..bacbc590 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -6,6 +6,7 @@
<button
ref="trigger"
class="button-unstyled -fullwidth popover-trigger-button"
+ type="button"
@click="onClick"
>
<slot name="trigger" />