Skip to content

Commit

Permalink
Merge branch 'pr/1667' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed Dec 15, 2024
2 parents a91c941 + 84ffd4d commit 8acf229
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Missing flag handling in ColorMyWorld #1603
- 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

## [1.8.0] - 2024-04-10
### Added
Expand Down
15 changes: 14 additions & 1 deletion js/journal.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,20 @@ enyo.kind({
this.$.activityPopup.setFooter(items);

// Show popup
this.$.activityPopup.setMargin({left: 0, top: (icon.owner.index*60)+20-mouse.position.y});
// Get the popup's size dynamically
var popupSize = 50; // Base header size
popupSize += (items.length * 42); // Add height for each item
var leftPostion = 0;
var topPosition = (icon.owner.index * 60) + 20 - mouse.position.y;
var bottomOverflow = mouse.position.y + popupSize - window.innerHeight+55;
if (bottomOverflow > 0) {
// If the popup overflows the bottom, adjust upwards
topPosition -= bottomOverflow;
if(!this.$.footer.getShowing()){
topPosition += 55; // HACK: 55 is the footer height
}
}
this.$.activityPopup.setMargin({ left: leftPostion, top: topPosition });
this.$.activityPopup.showPopup();
},

Expand Down

0 comments on commit 8acf229

Please sign in to comment.