anchor.diff:      if (_isOpening) return;
   
       // Stop listening to popup layout changes.
  -    _layoutInternalSub?.cancel();
  -    _layoutChangeSub?.cancel();
  -    _windowResizeSub?.cancel();
  +    _visibleDisposer.dispose();
   
       // Stop the reposition loop (if it's running).
       if (_repositionLoopId != null) {
  
positive.code:       : this.role = role ?? 'dialog' {
      // Close popup if parent closes.
      if (parentPopup != null) {
        parentPopup.onClose.listen((_) => close());
      }
  
      // Create the PopupRef for the ACX focus library.
      _resolvedPopupRef = MaterialPopupRef(this);
  
      // Start the shared window.resize listener (if it hasn't been already).
      _initViewportRect();
    }
  
    void _initViewportRect() {
      if (_viewportRect != null) return;
      // The reason a separate variable is maintained instead of using
      // window.innerWidth/window.innerHeight directly is because accessing
      // window.innerWidth/window.innerHeight can cause reflows.
      _viewportRect =
          MutableRectangle(0, 0, window.innerWidth, window.innerHeight);
      _ngZone.runOutsideAngular(() {
        window.onResize
            .transform(
                throttleStream(_resizeThrottleDuration, guaranteeLast: true))
            .listen((_) {
          _viewportRect.width = window.innerWidth;
          _viewportRect.height = window.innerHeight;
        });
      });
    }
  
    @override
  
negative.code:     if (_repositionLoopId != null) {
        window.cancelAnimationFrame(_repositionLoopId);
      }
      _visibleDisposer.dispose();
      _disposer.dispose();
      _animationTimer?.cancel();
      _isVisible = false;
  