How to update popover position on windows resizing event?

When I’m running my app in Google Chrome (Windows 10 desktop), I open a popover modal and resize my the browser window.

The popover will weep in the same position instead of uptate its position. If the button which throws the popover is in the right side of the page , and I resize the window the popover will keep the position relative to the left size of the window while the button moves.