parent
632de33035
commit
aab32214d6
|
@ -533,8 +533,10 @@
|
||||||
* @param {object} e Event
|
* @param {object} e Event
|
||||||
*/
|
*/
|
||||||
closeMobileMenu: function(e) {
|
closeMobileMenu: function(e) {
|
||||||
if (e.which === 13) {
|
var $search = $('#search');
|
||||||
|
if (e.which === 13 && $search.is(':focus')) {
|
||||||
$('#sidebar').removeClass('expanded');
|
$('#sidebar').removeClass('expanded');
|
||||||
|
$search.blur();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -601,7 +603,7 @@
|
||||||
.prepend(
|
.prepend(
|
||||||
$('<div id="mobile-menu-toggle"><button><i class="icon-menu"></i></button></div>')
|
$('<div id="mobile-menu-toggle"><button><i class="icon-menu"></i></button></div>')
|
||||||
);
|
);
|
||||||
$search.on('keypress', this.closeMobileMenu);
|
$(window).on('keypress', this.closeMobileMenu);
|
||||||
|
|
||||||
this.mobileMenu = true;
|
this.mobileMenu = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue