From 5f71cf63ce018bc1631a2946c67f1edb0e89fe35 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Fri, 15 Aug 2014 17:16:29 -0400 Subject: [PATCH] Use the slow jQuery path to animate scrollTop This might be worth either splitting animate() into one for DOM properties and one for pure-CSS or replacing the scrollTop animation with something like margin or, better yet, transform. --- source/js/Core/Core/VMM.Library.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/js/Core/Core/VMM.Library.js b/source/js/Core/Core/VMM.Library.js index 0031626b..ceb1809 100644 --- a/source/js/Core/Core/VMM.Library.js +++ b/source/js/Core/Core/VMM.Library.js @@ -427,9 +427,10 @@ if(typeof VMM != 'undefined') { jQuery(element).stop(); } }, - + + // TODO: Consider removing this as it's referenced by one commented line delay_animate: function(delay, element, duration, ease, att, callback_function) { - if (VMM.Browser.features.css.transitions) { + if (VMM.Browser.features.css.transitions && !('scrollTop' in _att)) { var _tdd = Math.round((duration/1500)*10)/10, __duration = _tdd + 's'; @@ -478,9 +479,7 @@ if(typeof VMM != 'undefined') { _att = {opacity: 0} } - - if (VMM.Browser.features.css.transitions) { - + if (VMM.Browser.features.css.transitions && !('scrollTop' in _att)) { var _tdd = Math.round((_duration/1500)*10)/10, __duration = _tdd + 's';