]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Reveal: Finally sorted out the thing where iOS Safari was still scrolling with overfl...
authorChris Oyler <christopher.oyler@gmail.com>
Thu, 28 Jan 2016 22:10:32 +0000 (14:10 -0800)
committerChris Oyler <christopher.oyler@gmail.com>
Thu, 28 Jan 2016 22:10:32 +0000 (14:10 -0800)
js/foundation.new-reveal.js
scss/components/_reveal.scss

index 1585f1b2404326a446a3f87a6dec24772834479e..12e3f2f0aaeefd14e90a8f6fb400720a98e09192 100644 (file)
      */
                  .trigger('open.zf.reveal');
 
-    $('body').addClass('is-reveal-open')
-             .attr({'aria-hidden': (this.options.overlay || this.options.fullScreen) ? true : false});
+    $('html, body').addClass('is-reveal-open');
+    
+    $('body').attr({'aria-hidden': (this.options.overlay || this.options.fullScreen) ? true : false});
     setTimeout(function(){
       _this._extraHandlers();
     }, 0);
           'width': ''
         });
       }
-      $('body').removeClass('is-reveal-open').attr({'aria-hidden': false, 'tabindex': ''});
+      $('html, body').removeClass('is-reveal-open')
+      $('body').attr({'aria-hidden': false, 'tabindex': ''});
       _this.$element.attr({'aria-hidden': true})
       /**
       * Fires when the modal is done closing.
index de9b21699dfa68b622690dcecbeab072b636495b..440d2cb40d27880f04f405ad78f60906e17f691e 100644 (file)
@@ -126,6 +126,14 @@ $reveal-overlay-background: rgba($black, 0.45) !default;
   body.is-reveal-open {
     overflow: hidden;
   }
+  
+  /* this little snippet causes the intended scroll blocking on iOS Safari,
+     which can still DIAF, because it breaks literally everything else */
+  // html, body.is-reveal-open {
+  //   overflow: hidden;
+  //   position: relative;
+  //   height: 100%;
+  // }
 
   // Overlay
   .reveal-overlay {