From ee14b77329a4ce312382dc4c5f63bed72ebb2695 Mon Sep 17 00:00:00 2001 From: Hunternif Date: Sun, 16 Feb 2025 20:29:02 +0000 Subject: client: fix post width on small screen with scrollbar --- client/js/controls/post_content_control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/controls/post_content_control.js b/client/js/controls/post_content_control.js index b42c711..d8f1e51 100644 --- a/client/js/controls/post_content_control.js +++ b/client/js/controls/post_content_control.js @@ -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"; -- cgit v1.3