Permalink
Browse files

bug: Navigation-Link in Drawer toggled obfuscator

  • Loading branch information...
MikeMitterer committed Nov 16, 2015
1 parent 3e0a618 commit defc6a9c3a3a8239e8eaf2aad0d6f3a369df9760
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/src/components/MaterialLayout.dart
@@ -298,7 +298,7 @@ class MaterialLayout extends MdlComponent {
//_logger.info("Check: .${_cssClasses.NAVI_LINK}");
element.querySelectorAll(".${_cssClasses.NAVI_LINK}").forEach((final dom.Element element) {
eventStreams.add(
- element.onClick.listen( _drawerToggleHandler));
+ element.onClick.listen( _drawerRemove));
});
final dom.DivElement obfuscator = new dom.DivElement();
@@ -441,6 +441,12 @@ class MaterialLayout extends MdlComponent {
obfuscator.classes.toggle(_cssClasses.IS_DRAWER_OPEN);
}
+ /// Explicit remove drawer
+ void _drawerRemove(final dom.MouseEvent _) {
+ drawer.classes.remove(_cssClasses.IS_DRAWER_OPEN);
+ obfuscator.classes.remove(_cssClasses.IS_DRAWER_OPEN);
+ }
+
/// Handles (un)setting the `is-animating` class
void _headerTransitionEndHandler(final dom.Event event) {

0 comments on commit defc6a9

Please sign in to comment.