Skip to content

Commit

Permalink
Merge branch 'dev' into ROU-11563-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
joselrio authored Jan 31, 2025
2 parents e644058 + 0eccc2c commit 6aacdf5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,8 @@ namespace OSFramework.OSUI.Patterns.Dropdown.ServerSide {

// Method to move Balloon Options Wrapper to outside of the pattern context
private _moveBalloonOptionsWrapper(): void {
/* NOTE:
- When inside BottomSheet the BalloonOptionsWrapper should be moved to the content wrapper
due to position issues related with fixed position of the balloon against BottomSheet fixed position.
More info at Release Note: ROU-11549
*/
// Ensure DropdownServerSide is inside at BottomSheet
if (Helper.DeviceInfo.IsPhone && this.selfElement.closest(Enum.InsidePattern.BottomSheet)) {
// Check if BalloonOptions should be moved outside of the pattern context
if (this._shouldBalloonOptionsBeMoved()) {
// Get the content element where to move the BalloonOptionsWrapper
const contentElem = Helper.Dom.ClassSelector(document, GlobalEnum.CssClassElements.Content);
// Move the DropdownServerSide ballon element to the content element
Expand Down Expand Up @@ -451,6 +446,26 @@ namespace OSFramework.OSUI.Patterns.Dropdown.ServerSide {
}
}

// Method that will check if the BalloonOptionsWrapper should be moved outside of the pattern context
private _shouldBalloonOptionsBeMoved(): boolean {
/* NOTE:
- When inside BottomSheet the BalloonOptionsWrapper should be moved to the content wrapper
due to position issues related with fixed position of the balloon against BottomSheet fixed position.
More info at Release Note: ROU-11549
*/
// Check if the DropdownServerSide is inside a BottomSheet, Notification, or Sidebar
if (
Helper.DeviceInfo.IsPhone &&
(this.selfElement.closest(Enum.InsidePattern.BottomSheet) ||
this.selfElement.closest(Enum.InsidePattern.Notification) ||
this.selfElement.closest(Enum.InsidePattern.Sidebar))
) {
return true;
} else {
return false;
}
}

// Method used to manage the onTouchMove when we're at mobile devices in order to block the window scroll!
// This is an improvement specially to iOS since otherwise it will be able to scroll the pattern when keyboard is open!
private _touchMove(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ namespace OSFramework.OSUI.Patterns.Dropdown.ServerSide.Enum {
*/
export enum InsidePattern {
BottomSheet = '.osui-bottom-sheet',
Notification = '.osui-notification',
Sidebar = '.osui-sidebar',
}

/**
Expand Down

0 comments on commit 6aacdf5

Please sign in to comment.