Skip to content

Commit

Permalink
client: fix post width on small screen with scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunternif committed Feb 16, 2025
1 parent 5720297 commit ee14b77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/js/controls/post_content_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PostContentControl {
// on mobile don't make the content node narrower than the screen, so that small images are centered
// use browser width to accommodate Android's on-screen buttons in landscape mode
if (window.innerWidth <= 800) {
width = Math.max(window.innerWidth, width);
width = Math.max(window.visualViewport.width, width);
}
this._postContentNode.style.width = width + "px";
this._postContentNode.style.height = height + "px";
Expand Down

0 comments on commit ee14b77

Please sign in to comment.