mirror of
https://github.com/google/material-design-lite.git
synced 2024-11-13 00:47:40 +03:00
Fix issues with layout obfuscator in iOS9. Fixes #1696.
iOS9 seemingly breaks the general sibling selector (~) in WebViews. This works around the problem by styling the obfuscator differently.
This commit is contained in:
parent
6b6abf5e16
commit
45fd155b35
@ -382,7 +382,7 @@
|
|||||||
transition-property: background-color;
|
transition-property: background-color;
|
||||||
@include material-animation-default();
|
@include material-animation-default();
|
||||||
|
|
||||||
.mdl-layout__drawer.is-visible ~ & {
|
&.is-visible {
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,7 @@
|
|||||||
// Collapse drawer (if any) when moving to a large screen size.
|
// Collapse drawer (if any) when moving to a large screen size.
|
||||||
if (this.drawer_) {
|
if (this.drawer_) {
|
||||||
this.drawer_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN);
|
this.drawer_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN);
|
||||||
|
this.obfuscator_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -162,6 +163,7 @@
|
|||||||
*/
|
*/
|
||||||
MaterialLayout.prototype.drawerToggleHandler_ = function() {
|
MaterialLayout.prototype.drawerToggleHandler_ = function() {
|
||||||
this.drawer_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN);
|
this.drawer_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN);
|
||||||
|
this.obfuscator_.classList.toggle(this.CssClasses_.IS_DRAWER_OPEN);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -340,6 +342,7 @@
|
|||||||
obfuscator.addEventListener('click',
|
obfuscator.addEventListener('click',
|
||||||
this.drawerToggleHandler_.bind(this));
|
this.drawerToggleHandler_.bind(this));
|
||||||
obfuscator.addEventListener('mousewheel', eatEvent);
|
obfuscator.addEventListener('mousewheel', eatEvent);
|
||||||
|
this.obfuscator_ = obfuscator;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize tabs, if any.
|
// Initialize tabs, if any.
|
||||||
|
Loading…
Reference in New Issue
Block a user