Commits

James Taylor committed 0c16d37

iOS-scroll-fix patch

Comments (0)

Files changed (2)

+# HG changeset patch
+# Parent 33750f347be2aef72fe4e32d5c2197dd82f2b45a
+diff -r 33750f347be2 -r e4d63895400d templates/root/index.mako
+--- a/templates/root/index.mako	Fri Jan 04 14:26:22 2013 -0500
++++ b/templates/root/index.mako	Fri Jan 04 14:26:37 2013 -0500
+@@ -71,6 +71,15 @@
+                 galaxy_main.location = "${h.url_for( controller='history', action='import_archive' )}";
+             }
+         });
++
++        // Fix iFrame scrolling on iOS
++        if( navigator.userAgent.match( /(iPhone|iPod|iPad)/i ) ) {
++            $("iframe").parent().css( {
++                "overflow": "scroll",
++                "-webkit-overflow-scrolling": "touch",
++            })
++        }
++
+     });
+     </script>
+ </%def>
+@@ -118,7 +127,9 @@
+         center_url = h.url_for( '/static/welcome.html' )
+     %>
+     
+-    <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"></iframe>
++    <div style="position: absolute; width: 100%; height: 100%">
++        <iframe name="galaxy_main" id="galaxy_main" frameborder="0" style="position: absolute; width: 100%; height: 100%;" src="${center_url}"></iframe>
++    </div>
+ 
+ </%def>
+ 
+iOS-scroll-fix
 select2-for-big-selects
 weberror-paste-upgrades