Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
8aa81cac
Commit
8aa81cac
authored
Mar 12, 2012
by
catch
Browse files
Issue
#1199774
by nod_, droplet, xjm: Fixed toolbar layout error in IE.
parent
9e43704a
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/overlay/overlay-parent.js
View file @
8aa81cac
(
function
(
$
)
{
(
function
(
$
)
{
/**
/**
...
@@ -868,8 +867,13 @@ Drupal.overlay.getDisplacement = function (region) {
...
@@ -868,8 +867,13 @@ Drupal.overlay.getDisplacement = function (region) {
if
(
lastDisplaced
.
length
)
{
if
(
lastDisplaced
.
length
)
{
displacement
=
lastDisplaced
.
offset
().
top
+
lastDisplaced
.
outerHeight
();
displacement
=
lastDisplaced
.
offset
().
top
+
lastDisplaced
.
outerHeight
();
// Remove height added by IE Shadow filter.
// In modern browsers (including IE9), when box-shadow is defined, use the
if
(
lastDisplaced
[
0
].
filters
&&
lastDisplaced
[
0
].
filters
.
length
&&
lastDisplaced
[
0
].
filters
.
item
(
'
DXImageTransform.Microsoft.Shadow
'
))
{
// 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
-=
lastDisplaced
[
0
].
filters
.
item
(
'
DXImageTransform.Microsoft.Shadow
'
).
strength
;
displacement
=
Math
.
max
(
0
,
displacement
);
displacement
=
Math
.
max
(
0
,
displacement
);
}
}
...
...
core/modules/toolbar/toolbar.js
View file @
8aa81cac
...
@@ -94,11 +94,16 @@ Drupal.toolbar.toggle = function() {
...
@@ -94,11 +94,16 @@ Drupal.toolbar.toggle = function() {
};
};
Drupal
.
toolbar
.
height
=
function
()
{
Drupal
.
toolbar
.
height
=
function
()
{
var
height
=
$
(
'
#toolbar
'
).
outerHeight
();
var
$toolbar
=
$
(
'
#toolbar
'
);
// In IE, Shadow filter adds some extra height, so we need to remove it from
var
height
=
$toolbar
.
outerHeight
();
// the returned height.
// In modern browsers (including IE9), when box-shadow is defined, use the
if
(
$
(
'
#toolbar
'
).
css
(
'
filter
'
).
match
(
/DXImageTransform
\.
Microsoft
\.
Shadow/
))
{
// normal height.
height
-=
$
(
'
#toolbar
'
).
get
(
0
).
filters
.
item
(
"
DXImageTransform.Microsoft.Shadow
"
).
strength
;
var
cssBoxShadowValue
=
$toolbar
.
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
(
$toolbar
.
css
(
'
filter
'
)))
{
height
-=
$toolbar
[
0
].
filters
.
item
(
"
DXImageTransform.Microsoft.Shadow
"
).
strength
;
}
}
return
height
;
return
height
;
};
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment