UX: Shrink composer consistently when pressing Done in iOS

This commit is contained in:
Penar Musaraj 2020-07-21 23:54:43 -04:00
parent 93a8e34f47
commit 6d39452317
No known key found for this signature in database
GPG Key ID: E390435D881FF0F7
1 changed files with 4 additions and 5 deletions

View File

@ -99,7 +99,6 @@ function positioningWorkaround($fixedElement) {
positioningWorkaround.blur = function(evt) {
if (workaroundActive) {
$("body").removeClass("ios-safari-composer-hacks");
window.scrollTo(0, originalScrollTop);
if (evt && evt.target) {
@ -126,7 +125,8 @@ function positioningWorkaround($fixedElement) {
// - invoking a select-kit dropdown
// - invoking mentions
// - invoking emoji dropdown via : and hitting return
// - invoking a toolbar button
// - invoking a button in the editor toolbar
// - tapping on emoji in the emoji modal
if (
lastTouchedElement &&
@ -136,9 +136,8 @@ function positioningWorkaround($fixedElement) {
$(lastTouchedElement).closest(".autocomplete").length ||
(lastTouchedElement.nodeName.toLowerCase() === "textarea" &&
document.activeElement === lastTouchedElement) ||
["span", "svg", "button"].includes(
lastTouchedElement.nodeName.toLowerCase()
))
$(lastTouchedElement).closest(".d-editor-button-bar").length ||
$(lastTouchedElement).hasClass("emoji"))
) {
return;
}