Skip to content

Commit

Permalink
No need for timers, just stop even propogation!
Browse files Browse the repository at this point in the history
  • Loading branch information
CDrummond committed Oct 19, 2024
1 parent af8d9a9 commit 8c10083
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions MaterialSkin/HTML/material/html/js/bottomnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ Vue.component('lms-bottomnav', {
if (this.$store.state.visibleMenus.size>0) {
return;
}
if (undefined!=this.lastIcnPress && (new Date().getTime()-this.lastIcnPress)<100) {
return;
}
this.lastIcnPress = undefined;
this.tabPressed(this.items[idx].page, false)
},
icnPressed(longPress, el, ev) {
Expand All @@ -82,8 +78,9 @@ Vue.component('lms-bottomnav', {
if (idx<0 || idx>this.items.length) {
return;
}
this.lastIcnPress = new Date().getTime();
this.tabPressed(this.items[idx].page, longPress)
try { ev.preventDefault(); } catch(e) { }
try { ev.stopPropagation();} catch(e) { }
this.tabPressed(this.items[idx].page, longPress);
},
tabPressed(page, longPress) {
if (page!=this.$store.state.page) {
Expand Down

0 comments on commit 8c10083

Please sign in to comment.