Commits

James Taylor committed 312ba8a Draft

Fix for scrolling on iOS (thanks Carrie Ganote!)

  • Participants
  • Parent commits 8676b55

Comments (0)

Files changed (1)

templates/root/index.mako

                 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>
         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>