code: function Flyout_ensurePosition() {
                      this._keyboardMovedUs = false;
  
                      // Remove old height restrictions and scrolling.
                      this._clearAdjustedStyles();
  
                      this._setAlignment();
  
                      // Set up the new position, and prep the offset for showPopup.
                      var flyoutMeasurements = measureElement(this._element);
                      var isRtl = _ElementUtilities._getComputedStyle(this._element).direction === "rtl";
                      this._currentPosition = this._positionRequest.getTopLeft(flyoutMeasurements, isRtl);
  
                      // Adjust position
                      if (this._currentPosition.top < 0) {
                          // Overran bottom, attach to bottom.
                          this._element.style.bottom = _Overlay._Overlay._keyboardInfo._visibleDocBottomOffset + "px";
                          this._element.style.top = "auto";
                      } else {
                          // Normal, set top
                          this._element.style.top = this._currentPosition.top + "px";
                          this._element.style.bottom = "auto";
                      }
                      if (this._currentPosition.left < 0) {
                          // Overran right, attach to right
                          this._element.style.right = "0px";
                          this._element.style.left = "auto";
                      } else {
                          // Normal, set left
                          this._element.style.left = this._currentPosition.left + "px";
                          this._element.style.right = "auto";
                      }
  
                      // Adjust height/scrollbar
                      if (this._currentPosition.doesScroll) {
                          _ElementUtilities.addClass(this._element, _Constants.scrollsClass);
                          this._lastMaxHeight = this._element.style.maxHeight;
                          this._element.style.maxHeight = this._currentPosition.contentHeight + "px";
                      }
  
                      // May need to adjust if the IHM is showing.
                      if (_Overlay._Overlay._keyboardInfo._visible) {
                          // Use keyboard logic
                          this._checkKeyboardFit();
  
                          if (this._keyboardMovedUs) {
                              this._adjustForKeyboard();
                          }
                      }
                  }
docs: Find our new flyout position.