diff options
| author | Hunternif <hunternif@gmail.com> | 2025-02-16 20:29:02 +0000 |
|---|---|---|
| committer | Hunternif <hunternif@gmail.com> | 2025-02-16 20:29:02 +0000 |
| commit | ee14b77329a4ce312382dc4c5f63bed72ebb2695 (patch) | |
| tree | 09e99583d3f4a002379abcd11f42a71a2b986545 /client | |
| parent | 5720297b4006eed53db19da5547bcac6307cf094 (diff) | |
client: fix post width on small screen with scrollbar
Diffstat (limited to 'client')
| -rw-r--r-- | client/js/controls/post_content_control.js | 2 |
1 files changed, 1 insertions, 1 deletions
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"; |