Permalink
Browse files

Auto-close the sidebar on click (#145).

  • Loading branch information...
1 parent c4776fd commit d953b643862eea8584f346cb11e27a90544b6a67 @andreacampi andreacampi committed Feb 9, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/ui/chrome.js
View
@@ -606,6 +606,14 @@ goog.scope(function() {
this.sidebars.forEach(function(sidebar) {
this.sidebarInactive(sidebar);
}, this);
+ } else {
+ if ((nearestSidebar = this.getNearestSidebar(el))) {
+ if (dom.hasClass(nearestSidebar, 'sidebar') && dom.hasClass(nearestSidebar, 'close-on-click')) {
+ this.sidebars.forEach(function(sidebar) {
+ this.sidebarInactive(sidebar);
+ }, this);
+ }
+ }
}
// Compiler cast

0 comments on commit d953b64

Please sign in to comment.