Skip to content

Commit

Permalink
Auto-close the sidebar on click (Treesaver#145).
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Campi committed Feb 27, 2012
1 parent c4776fd commit d953b64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ui/chrome.js
Expand Up @@ -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
Expand Down

0 comments on commit d953b64

Please sign in to comment.