Skip to content

Commit

Permalink
Merge branch 'pr/1675' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed Dec 15, 2024
2 parents 8acf229 + 54a9f54 commit 18ab077
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Position of Sugar Icon in Popup on homescreen is toward bottom right #1662
- Recording video doesn't work on Windows #1203
- Activity Description opening downwards in Journal #1407
- Listview Popup increasing page length and opening downwards for lower icons #1674

## [1.8.0] - 2024-04-10
### Added
Expand Down
10 changes: 8 additions & 2 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,15 @@ enyo.kind({
// Popup will overflow window, prepare to shift menu
this.overflowY = true;
}
var screenHeight = document.getElementById("canvas").offsetHeight;
var popupTopPosition = mouse.position.y + this.margin.top;
var popupBottomPosition = mouse.position.x + this.margin.left;
if (mouse.position.y + popupSize > screenHeight) {
popupTopPosition = screenHeight+this.margin.top-popupSize;
}
this.setStyle("bottom", "");
this.applyStyle("top", (mouse.position.y+this.margin.top)+"px");
this.applyStyle("left", (mouse.position.x+this.margin.left)+"px");
this.applyStyle("top", (popupTopPosition) + "px");
this.applyStyle("left", (popupBottomPosition) + "px");
this.show();
this.timer = window.setInterval(enyo.bind(this, "showContent"), 0);
},
Expand Down

0 comments on commit 18ab077

Please sign in to comment.