Now checking both forwardClick and backClick to ensure the back button isn't clicked after the forward click or vice versa

This commit is contained in:
Leah Schumann 2022-12-29 09:29:41 -05:00
parent b5148b2d23
commit 773634e26f

View file

@ -72,6 +72,15 @@ export default {
? this.customButtontext
: this.getCmsContent(this.cmsWidgetName, "ForwardButtonText");
},
navigationButtonClicked: {
get: function () {
return this.forwardClicked || this.backClicked;
},
set: function (newValue) {
this.forwardClicked = newValue;
this.backClicked = newValue;
}
},
},
methods: {
onResize() {
@ -82,10 +91,12 @@ export default {
},
removeLoader() {
this.$refs.buttonMain.removeLoader();
document.onkeydown = function (e) {
return true;
};
this.forwardClicked = false;
this.navigationButtonClicked = false;
},
buttonClick() {
//prevent keyboard input after button click
@ -93,13 +104,13 @@ export default {
return false;
};
if (!this.forwardClicked) {
if (!this.navigationButtonClicked) {
this.$emit("ForwardClicked");
this.forwardClicked = true;
}
},
linkClick() {
if (!this.backClicked) {
if (!this.navigationButtonClicked) {
this.$emit("BackClicked");
this.backClicked = true;
}