Skip to content

Commit

Permalink
Use viewport meta tag to avoid scroll on swipe
Browse files Browse the repository at this point in the history
By default on the iPad when you attempt to swipe to change slide it
is also interpreted as a scroll event, causing a bouncing scroll.
Specifying the viewport means the browser does not attempt to scroll
outside the area of the slide.
  • Loading branch information
Theo Spears committed Jul 12, 2011
1 parent 0188635 commit 70b171d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions views/index.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><%= @title %></title>

<meta name="viewport" content="width=device-width"/>

<link rel="stylesheet" href="<%= @asset_path %>css/reset.css" type="text/css"/>
<link rel="stylesheet" href="<%= @asset_path %>css/showoff.css" type="text/css"/>

Expand Down

0 comments on commit 70b171d

Please sign in to comment.