You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was noticing that on the first click to show my popover, the popover was always slightly off position. Subsequent clicks correctly positioned the popover.
I found out that since no default absolute position is set on the popover and due to me using Flexbox, that when the popover's display was changed to block in the source code (which occurs BEFORE it's absolute position is determined), the UI layout displayed a browser scrollbar which then shifted the location of my element showing the popover and incorrect location values were calculated for the popup.
The simple fix I added was to just set an initial position on the popup when it's display is initially set to none: nsPopover.js
Thus, when the browser sets the popover's display to 'block' my page isn't "shifted" and the correct location of my element is calculated.
I'm posting this in case others experience a similar problem or are having issues using a layout framework (like Flexbox) and the initial positioning of the popover is slightly off.
I don't think setting this initial position would cause any other issues but I think ultimately, adding the following capabilities would be even better and may make my issue obsolete: #1 #15
The text was updated successfully, but these errors were encountered:
So I am using Angular Material design for angular (which uses Flexbox for layout).
I was noticing that on the first click to show my popover, the popover was always slightly off position. Subsequent clicks correctly positioned the popover.
I found out that since no default absolute position is set on the popover and due to me using Flexbox, that when the popover's display was changed to block in the source code (which occurs BEFORE it's absolute position is determined), the UI layout displayed a browser scrollbar which then shifted the location of my element showing the popover and incorrect location values were calculated for the popup.
The simple fix I added was to just set an initial position on the popup when it's display is initially set to none:
nsPopover.js
Thus, when the browser sets the popover's display to 'block' my page isn't "shifted" and the correct location of my element is calculated.
I'm posting this in case others experience a similar problem or are having issues using a layout framework (like Flexbox) and the initial positioning of the popover is slightly off.
I don't think setting this initial position would cause any other issues but I think ultimately, adding the following capabilities would be even better and may make my issue obsolete:
#1
#15
The text was updated successfully, but these errors were encountered: