FIX: Composer position on DiscourseHub iOS (#30204)

Ensures composer does not go out of view after adding an upload.
This commit is contained in:
Penar Musaraj 2024-12-10 09:42:20 -05:00 committed by GitHub
parent 34152f10b0
commit 0affb5c0bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,6 +49,7 @@ function positioningWorkaround(fixedElement) {
// - invoking emoji dropdown via : and hitting return
// - invoking a button in the editor toolbar
// - tapping on emoji in the emoji modal
// - tapping on the upload button
// - tapping on the edit reason icon/input
if (
@ -61,6 +62,7 @@ function positioningWorkaround(fixedElement) {
document.activeElement === lastTouchedElement) ||
lastTouchedElement.closest(".d-editor-button-bar") ||
lastTouchedElement.classList.contains("emoji") ||
lastTouchedElement.closest(".mobile-file-upload") ||
lastTouchedElement.closest(".display-edit-reason"))
) {
return;