From 5f202e856da580004fb2f3778a51ba085a531353 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 29 Dec 2022 08:32:17 -0500 Subject: [PATCH 1/4] Added check for previous click in footer forward and back button / link --- .../funnel-footer/funnel-footer.vue | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index 2a6119681..4a1c63c16 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -47,6 +47,8 @@ export default { return { paddingHeight: 0, customButtontext: "", + forwardClicked: false, + backClicked: false, }; }, mounted() { @@ -83,16 +85,26 @@ export default { document.onkeydown = function (e) { return true; }; + this.forwardClicked = false; }, buttonClick() { //prevent keyboard input after button click document.onkeydown = function (e) { return false; }; - this.$emit("ForwardClicked"); + + if (!this.forwardClicked) { + this.$emit("ForwardClicked"); + this.forwardClicked = true; + } + }, linkClick() { - this.$emit("BackClicked"); + if (!this.backClicked) { + this.$emit("BackClicked"); + this.backClicked = true; + } + }, }, }; From b5148b2d237abdea818709052b9ea941de546179 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 29 Dec 2022 09:00:22 -0500 Subject: [PATCH 2/4] Prettified --- src/common-components/funnel-footer/funnel-footer.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index 4a1c63c16..139186421 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -97,14 +97,12 @@ export default { this.$emit("ForwardClicked"); this.forwardClicked = true; } - }, linkClick() { if (!this.backClicked) { this.$emit("BackClicked"); this.backClicked = true; } - }, }, }; From 773634e26f220df0f4600dd9523199f4c2d06312 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 29 Dec 2022 09:29:41 -0500 Subject: [PATCH 3/4] Now checking both forwardClick and backClick to ensure the back button isn't clicked after the forward click or vice versa --- .../funnel-footer/funnel-footer.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index 139186421..e63bf9619 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -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; } From 2dba3314c1b790c261ec6a830780ebbd6ca774b4 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 29 Dec 2022 09:34:12 -0500 Subject: [PATCH 4/4] Prettified again --- src/common-components/funnel-footer/funnel-footer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index e63bf9619..f17e2940d 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -79,7 +79,7 @@ export default { set: function (newValue) { this.forwardClicked = newValue; this.backClicked = newValue; - } + }, }, }, methods: { @@ -95,7 +95,7 @@ export default { document.onkeydown = function (e) { return true; }; - + this.navigationButtonClicked = false; }, buttonClick() {