From 38be96972773094bec9a201337d6255f630a9c9d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 19 Jul 2017 11:17:53 +0200 Subject: [PATCH] do not apply touch start hack on emojis --- app/assets/javascripts/discourse/lib/safari-hacks.js.es6 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 index 745f7a84de7..89bc99ea605 100644 --- a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 +++ b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 @@ -7,8 +7,8 @@ export function isAppleDevice() { } -// we can't tell what the actual visible window height is -// because we cannot account for the height of the mobile keyboard +// we can't tell what the actual visible window height is +// because we cannot account for the height of the mobile keyboard // and any other mobile autocomplete UI that may appear // so let's be conservative here rather than trying to max out every // available pixel of height for the editor @@ -123,6 +123,10 @@ function positioningWorkaround($fixedElement) { const checkForInputs = _.debounce(function(){ $fixedElement.find('button:not(.hide-preview),a:not(.mobile-file-upload):not(.toggle-toolbar)').each(function(idx, elem){ + if ($(elem).parents('.emoji-picker').length > 0) { + return; + } + if ($(elem).parents('.autocomplete').length > 0) { return; }