]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
removed mobile-specific code
authorIgal Sapir <dev@21solutions.net>
Wed, 30 Aug 2017 05:59:41 +0000 (22:59 -0700)
committerIgal Sapir <dev@21solutions.net>
Wed, 30 Aug 2017 05:59:41 +0000 (22:59 -0700)
js/foundation.reveal.js

index 250587a7e1a65afd0236f8b5d4a9b38c7deacdac..adfa2700ce3f911a238c61932a3d9584df3497f3 100644 (file)
@@ -266,16 +266,10 @@ class Reveal extends Plugin {
     var _this = this;
 
     function addRevealOpenClasses() {
-      if (_this.isMobile) {
-        if(!_this.originalScrollPos) {
-          _this.originalScrollPos = window.pageYOffset;
-        }
-        $('html, body').addClass('is-reveal-open');
-      }
-      else {
-        $('body').addClass('is-reveal-open');
-      }
+
+      $('body').addClass('is-reveal-open');
     }
+
     // Motion UI method of reveal
     if (this.options.animationIn) {
       function afterAnimation(){
@@ -400,21 +394,10 @@ class Reveal extends Plugin {
     this.$element.off('keydown.zf.reveal');
 
     function finishUp() {
-      if (_this.isMobile) {
-        if ($('.reveal:visible').length === 0) {
-          $('html, body').removeClass('is-reveal-open');
-        }
-        if(_this.originalScrollPos) {
-          $('body').scrollTop(_this.originalScrollPos);
-          _this.originalScrollPos = null;
-        }
-      }
-      else {
-        if ($('.reveal:visible').length  === 0) {
-          $('body').removeClass('is-reveal-open');
-        }
-      }
 
+      if ($('.reveal:visible').length  === 0) {
+        $('body').removeClass('is-reveal-open');
+      }
 
       Keyboard.releaseFocus(_this.$element);