Commit 3b2f5ad9 authored by Dries's avatar Dries

- Patch #1260800 by David_Rothstein, lewisnyman, yoroy, nod_, thedavidmeister,...

- Patch #1260800 by David_Rothstein, lewisnyman, yoroy, nod_, thedavidmeister, effulgentsia: kill the overlay for widths below 640 pixels.
parent 0ecf3668
......@@ -112,6 +112,15 @@ Drupal.detachBehaviors = function (context, settings, trigger) {
}
};
/**
* Helper to test document width for mobile configurations.
* @todo Temporary solution for the mobile initiative.
*/
Drupal.checkWidthBreakpoint = function (width) {
width = width || Drupal.settings.widthBreakpoint || 640;
return (document.documentElement.clientWidth > width);
};
/**
* Encode special characters in a plain-text string for display as HTML.
*
......
......@@ -23,6 +23,12 @@ Drupal.behaviors.overlayParent = {
// permalinks open the overlay.
.triggerHandler('hashchange.drupal-overlay');
// Do not use the overlay on devices with low screen width.
// @todo Replace with conditional loading.
if(!Drupal.checkWidthBreakpoint()) {
return;
}
$(document)
// Instead of binding a click event handler to every link we bind one to
// the document and only handle events that bubble up. This allows other
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment