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
1 changed files with 2 additions and 0 deletions

View File

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