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:
Sérgio Gomes 2015-10-09 15:16:12 +01:00
parent 6b6abf5e16
commit 45fd155b35
2 changed files with 4 additions and 1 deletions

View File

@ -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;
} }

View File

@ -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.