Fix navigation behavior not clearing active items properly

This commit is contained in:
Eric Lippmann 2016-12-12 15:02:28 +01:00
parent 7dc4d3d63e
commit 67e41af308
1 changed files with 2 additions and 8 deletions

View File

@ -49,9 +49,7 @@
Navigation.prototype.onRendered = function(e) { Navigation.prototype.onRendered = function(e) {
var _this = e.data.self; var _this = e.data.self;
if (! _this.$menu) { _this.$menu = $(e.target);
_this.$menu = $(e.target);
}
if (! _this.active) { if (! _this.active) {
// There is no stored menu item, therefore it is assumed that this is the first rendering // There is no stored menu item, therefore it is assumed that this is the first rendering
@ -180,11 +178,7 @@
* Remove all active elements * Remove all active elements
*/ */
Navigation.prototype.clear = function() { Navigation.prototype.clear = function() {
// menu items this.$menu.find('.active').removeClass('active');
this.$menu.find('li.active').removeClass('active');
// search fields
this.$menu.find('input.active').removeClass('active');
}; };
/** /**