diff --git a/app/assets/javascripts/discourse/lib/mobile.js.es6 b/app/assets/javascripts/discourse/lib/mobile.js.es6
index ef2d07bbfd8..940e18c44bc 100644
--- a/app/assets/javascripts/discourse/lib/mobile.js.es6
+++ b/app/assets/javascripts/discourse/lib/mobile.js.es6
@@ -29,6 +29,18 @@ const Mobile = {
// localStorage may be disabled, just skip this
// you get security errors if it is disabled
}
+
+ // Sam: I tried this to disable zooming on iOS 10 but it is not consistent
+ // you can still sometimes trigger zoom and be stuck in a horrible state
+ //
+ // let iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
+ // if (iOS) {
+ // document.documentElement.addEventListener('touchstart', function (event) {
+ // if (event.touches.length > 1) {
+ // event.preventDefault();
+ // }
+ // }, false);
+ // }
},
toggleMobileView() {
diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb
index 6a5ab0ee6cc..c81db33c80c 100644
--- a/app/views/layouts/_head.html.erb
+++ b/app/views/layouts/_head.html.erb
@@ -10,7 +10,11 @@
<%- end %>
+<% if mobile_view? %>
+
+<% else %>
+<% end %>
<%= canonical_link_tag %>
<%= render_sitelinks_search_tag %>