From 6358718879af099fa5f6da579c800cfcef658569 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 22 Jun 2018 01:23:09 +0200 Subject: focusing working bettr --- StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'StoneIsland/platforms/ios/www/js/lib') diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js index 884b9d5a..3a9e6412 100755 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js @@ -35,6 +35,11 @@ var CartPayment = FormView.extend({ this.address = new AddressView ({ parent: this, checkPhone: false }) this.cc = new CreditCardView ({ parent: this }) this.scroller = new IScroll('#cart_payment', app.iscroll_options) + this.scroller.on('scrollStart', function(){ + if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'SELECT') { + document.activeElement.blur() + } + }) this.address.disabled = true this.cc.disabled = true }, @@ -85,6 +90,11 @@ var CartPayment = FormView.extend({ focus_on_cc: function(e){ this.scroller.scrollToElement(e.currentTarget) + if (e.currentTarget.textShadow === '') { + e.currentTarget.textShadow = 'rgba(0,0,0,0) 0 0 0'; + } else { + e.currentTarget.textShadow = ''; + } }, populate: function(){ -- cgit v1.2.3-70-g09d2