Skip to content
Snippets Groups Projects
Commit 3b2f5ad9 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- 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
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment