@@ -532,7 +532,7 @@ export class OuiPopover extends Component<Props, State> {
532532 }
533533
534534 if ( this . props . repositionOnScroll ) {
535- window . addEventListener ( 'scroll' , this . positionPopoverFixed ) ;
535+ window . addEventListener ( 'scroll' , this . positionPopoverFixed , true ) ;
536536 }
537537 }
538538
@@ -545,9 +545,9 @@ export class OuiPopover extends Component<Props, State> {
545545 // update scroll listener
546546 if ( prevProps . repositionOnScroll !== this . props . repositionOnScroll ) {
547547 if ( this . props . repositionOnScroll ) {
548- window . addEventListener ( 'scroll' , this . positionPopoverFixed ) ;
548+ window . addEventListener ( 'scroll' , this . positionPopoverFixed , true ) ;
549549 } else {
550- window . removeEventListener ( 'scroll' , this . positionPopoverFixed ) ;
550+ window . removeEventListener ( 'scroll' , this . positionPopoverFixed , true ) ;
551551 }
552552 }
553553
@@ -565,7 +565,7 @@ export class OuiPopover extends Component<Props, State> {
565565 }
566566
567567 componentWillUnmount ( ) {
568- window . removeEventListener ( 'scroll' , this . positionPopoverFixed ) ;
568+ window . removeEventListener ( 'scroll' , this . positionPopoverFixed , true ) ;
569569 clearTimeout ( this . respositionTimeout ) ;
570570 clearTimeout ( this . closingTransitionTimeout ) ;
571571 cancelAnimationFrame ( this . closingTransitionAnimationFrame ! ) ;
0 commit comments