From 0c30f31f17c7d118efa39431b2229fc14c1d3328 Mon Sep 17 00:00:00 2001 From: Osama Sayegh Date: Fri, 20 Jan 2023 14:23:19 +0300 Subject: [PATCH] FIX: Allow modals to scroll on mobile when keyboard is open (#19930) Meta topic: https://meta.discourse.org/t/android-keyboard-overlaps-text-when-flagging-with-something-else/249687?u=osama On Android, it's currently not possible to scroll modals that take input from the user (such as the flagging modal) when the keyboard is open which means that the keyboard can cover up part of the modal with no way for the user to see the covered part without closing the keyboard. This commit adds some CSS to make these modals scrollable when the keyboard is open. --- app/assets/stylesheets/mobile/modal.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/stylesheets/mobile/modal.scss b/app/assets/stylesheets/mobile/modal.scss index fb69050d3d7..d004c9309e4 100644 --- a/app/assets/stylesheets/mobile/modal.scss +++ b/app/assets/stylesheets/mobile/modal.scss @@ -106,6 +106,14 @@ &.insert-hyperlink-modal .modal-inner-container { overflow: visible; } + + html.keyboard-visible:not(.ios-device) & { + height: calc(100% - env(keyboard-inset-height)); + + .modal-inner-container { + margin: auto; + } + } } .modal .modal-body.reorder-categories {