Fixed issue with anchors and Offcanvas not resetting the overlay in IE and Firefox (fixes #1399)

This commit is contained in:
Djamil Legato
2016-07-06 20:24:17 -07:00
parent 27e7c5d0df
commit 0239a96b61
3 changed files with 20 additions and 0 deletions
+8
View File
@@ -74,6 +74,7 @@ var Menu = new prime({
}
body.delegate('click', ':not(' + selectors.mainContainer + ') ' + selectors.linkedParent + ', .g-fullwidth .g-sublevel ' + selectors.linkedParent, this.bound('click'));
body.delegate('click', ':not(' + selectors.mainContainer + ') a[href]', this.bound('resetAfterClick'));
if (hasTouchEvents || !this.hoverExpand) {
var linkedParent = $(selectors.linkedParent);
@@ -95,6 +96,13 @@ var Menu = new prime({
this.touchend(event);
},
resetAfterClick: function(event) {
this.closeDropdown(event);
if (global.G5 && global.G5.offcanvas) {
G5.offcanvas.close();
}
},
mouseenter: function(event) {
var element = $(event.target);
if (!element.parent(this.options.selectors.mainContainer)) { return; }