From 59ba9520ded94984588c83dea3247c425403f427 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 8 May 2015 13:30:24 -0400 Subject: [PATCH] init fast click for safari --- dashboard-ui/scripts/site.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 73a7e4b65..8a5be3b93 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1582,10 +1582,20 @@ var AppInfo = {}; } } + function initFastClick() { + + FastClick.attach(document.body); + + // Have to work around this issue of fast click breaking the panel dismiss + $(document.body).on('touchstart', '.ui-panel-dismiss', function () { + $(this).trigger('click'); + }); + } + function onReady() { - if ($.browser.safari) { - //FastClick.attach(document.body); + if ($.browser.safari && $.browser.mobile) { + initFastClick(); } if (AppInfo.hasLowImageBandwidth) {