From 31d801ce2ce29f8e2643c3d3c63d62dcaebdc288 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 16 Sep 2015 13:16:08 +1000 Subject: [PATCH] don't blur on autocomplete click --- app/assets/javascripts/discourse/lib/safari-hacks.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 index e4dde154b..cc93ebdd6 100644 --- a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 +++ b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 @@ -93,7 +93,11 @@ function positioningWorkaround($fixedElement) { } const checkForInputs = _.debounce(function(){ - $fixedElement.find('button,a').each(function(){ + $fixedElement.find('button,a:not(.autocomplete)').each(function(idx, elem){ + if ($(elem).parents('.autocomplete').length > 0) { + return; + } + attachTouchStart(this, function(evt){ done = true; $(document.activeElement).blur();