diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-03-13 09:50:24 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-03-13 09:50:24 -0700 |
commit | fe5048c0791a7573353e10750f8ddf9ea2424d17 (patch) | |
tree | 4d588e70fffb3dffc746c0fe0974f34a31d39b1c /modules/overlay | |
parent | 597bfd529759dcc1fdf9760c6917c867f09f60b5 (diff) | |
download | brdo-fe5048c0791a7573353e10750f8ddf9ea2424d17.tar.gz brdo-fe5048c0791a7573353e10750f8ddf9ea2424d17.tar.bz2 |
Issue #1199774 by nod_, droplet, xjm, ryanissamson: Fixed toolbar layout error in IE.
Diffstat (limited to 'modules/overlay')
-rw-r--r-- | modules/overlay/overlay-parent.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index 71cf3885c..ace7deff7 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -1,4 +1,3 @@ - (function ($) { /** @@ -861,8 +860,13 @@ Drupal.overlay.getDisplacement = function (region) { if (lastDisplaced.length) { displacement = lastDisplaced.offset().top + lastDisplaced.outerHeight(); - // Remove height added by IE Shadow filter. - if (lastDisplaced[0].filters && lastDisplaced[0].filters.length && lastDisplaced[0].filters.item('DXImageTransform.Microsoft.Shadow')) { + // In modern browsers (including IE9), when box-shadow is defined, use the + // normal height. + var cssBoxShadowValue = lastDisplaced.css('box-shadow'); + var boxShadow = (typeof cssBoxShadowValue !== 'undefined' && cssBoxShadowValue !== 'none'); + // In IE8 and below, we use the shadow filter to apply box-shadow styles to + // the toolbar. It adds some extra height that we need to remove. + if (!boxShadow && /DXImageTransform\.Microsoft\.Shadow/.test(lastDisplaced.css('filter'))) { displacement -= lastDisplaced[0].filters.item('DXImageTransform.Microsoft.Shadow').strength; displacement = Math.max(0, displacement); } |