diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js
index e78e383..6d33fad 100644
--- a/core/modules/overlay/overlay-child.js
+++ b/core/modules/overlay/overlay-child.js
@@ -1,5 +1,9 @@
-
 (function ($) {
+/**
+ * This whole script is conditional on whether the browser width is above 660px or a non-touch based device
+ */
+
+if((document.documentElement.clientWidth > 640) && (typeof TouchEvent == "undefined")) {
 
 /**
  * Attach the child dialog behavior to new content.
@@ -188,5 +192,6 @@ Drupal.overlayChild.tableHeaderOffset = function () {
 
   return topOffset + parseInt($(document.body).css('marginTop'));
 };
+}
 
 })(jQuery);
diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js
index 2e3b4f9..2be66f7 100644
--- a/core/modules/overlay/overlay-parent.js
+++ b/core/modules/overlay/overlay-parent.js
@@ -1,6 +1,12 @@
 (function ($) {
 
 /**
+ * This whole script is conditional on whether the browser width is above 660px and a non-touch based device
+ */
+
+if((document.documentElement.clientWidth > 640) && (typeof TouchEvent == "undefined")) {
+
+/**
  * Open the overlay, or load content into it, when an admin link is clicked.
  */
 Drupal.behaviors.overlayParent = {
@@ -972,5 +978,6 @@ Drupal.theme.prototype.overlayContainer = function () {
 Drupal.theme.prototype.overlayElement = function (url) {
   return '<iframe class="overlay-element" frameborder="0" scrolling="auto" allowtransparency="true"></iframe>';
 };
+}
 
 })(jQuery);
