FIX: Avoid unpinning composer on iOS when invoking emojis

Specifically when invoking emoji dropdown using a colon and pressing Return.
This commit is contained in:
Penar Musaraj 2019-12-06 14:08:59 -05:00
parent 78969d7719
commit 68124caae2
1 changed files with 4 additions and 0 deletions

View File

@ -116,12 +116,16 @@ function positioningWorkaround($fixedElement) {
// - switching to another iOS app
// - invoking a select-kit dropdown
// - invoking mentions
// - invoking emoji dropdown via : and hitting return
// - invoking a toolbar button
if (
lastTouchedElement &&
(document.visibilityState === "hidden" ||
$(lastTouchedElement).hasClass("select-kit-header") ||
$(lastTouchedElement).closest(".autocomplete").length ||
(lastTouchedElement.nodeName.toLowerCase() === "textarea" &&
document.activeElement === lastTouchedElement) ||
["span", "svg", "button"].includes(
lastTouchedElement.nodeName.toLowerCase()
))