Skip to content

Commit

Permalink
fix(md-sidenav): enablle closeOnClick for screens > 992px, close #318
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Nov 20, 2016
1 parent 0a59ca7 commit 4a86ab8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sidenav/sidenav-collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ export class MdSidenavCollapse {
// this.widthSubscription = this.observerLocator.getObserver(this.ref, 'mdWidth').subscribe(this.widthChanged.bind(this));
// this.fixedSubscription = this.observerLocator.getObserver(this.ref, 'fixed').subscribe(this.fixedChanged.bind(this));

const closeOnClick = this.ref.mdFixed && window.innerWidth > 992 ? false : getBooleanFromAttributeValue(this.ref.mdCloseOnClick);

this.element.setAttribute('data-activates', this.ref.controlId);
let sideNavConfig = {
edge: this.ref.mdEdge || 'left',
closeOnClick: (this.ref.mdFixed ? false : getBooleanFromAttributeValue(this.ref.mdCloseOnClick)),
// closeOnClick: (this.ref.mdFixed ? false : getBooleanFromAttributeValue(this.ref.mdCloseOnClick)),
closeOnClick,
menuWidth: parseInt(this.ref.mdWidth, 10)
};
// this.log.debug('sideNavConfig:', sideNavConfig);
Expand Down

0 comments on commit 4a86ab8

Please sign in to comment.