aboutsummaryrefslogtreecommitdiff
path: root/src/components/popover/popover.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/popover/popover.js')
-rw-r--r--src/components/popover/popover.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js
index 7d1ad1d6..c65689bd 100644
--- a/src/components/popover/popover.js
+++ b/src/components/popover/popover.js
@@ -129,9 +129,12 @@ const Popover = {
opacity: 1,
left: `${Math.round(origin.x + translateX)}px`,
top: `${Math.round(origin.y + translateY)}px`,
- maxWidth: `${parentScreenBox ? Math.round(parentScreenBox.width) : 0}px`,
position: 'fixed'
}
+
+ if (parentScreenBox) {
+ this.styles.maxWidth = `${Math.round(parentScreenBox.width)}px`
+ }
},
showPopover () {
const wasHidden = this.hidden