Skip to content

Commit

Permalink
FIX: Allow modals to scroll on mobile when keyboard is open (#19930)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
OsamaSayegh committed Jan 20, 2023
1 parent 90d452a commit 0c30f31
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/assets/stylesheets/mobile/modal.scss
Expand Up @@ -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 {
Expand Down

1 comment on commit 0c30f31

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/android-keyboard-overlaps-text-when-flagging-with-something-else/249687/6

Please sign in to comment.