CSR-762 Fix merge conflict
This commit is contained in:
commit
d3ab045ef2
3 changed files with 7 additions and 42 deletions
|
|
@ -5,17 +5,17 @@
|
|||
name="route-fade"
|
||||
mode="out-in">
|
||||
<!-- The above durations should be kept in sync with the global css class "fade-on-route-transition" -->
|
||||
<component :is="Component" @focusin="handleChildFocus" />
|
||||
<component :is="Component" @focusin="handleAnyComponentFocus" />
|
||||
</transition>
|
||||
</router-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { handleChildFocus } from "@/helpers/input-button-focus-helper"
|
||||
import { handleAnyComponentFocus } from "@/helpers/button-question-focus-helper"
|
||||
export default {
|
||||
name: "app",
|
||||
methods: {
|
||||
handleChildFocus: handleChildFocus
|
||||
handleAnyComponentFocus: handleAnyComponentFocus
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
import { useField } from "vee-validate";
|
||||
import { toRef } from "vue";
|
||||
import { queryStrings } from "@/constants/query-strings";
|
||||
import { handleInputFocus, handleInputBlur } from "@/helpers/input-button-focus-helper";
|
||||
import { handleButtonComponentFocus, handleInputComponentBlur } from "@/helpers/button-question-focus-helper";
|
||||
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
||||
|
||||
export default {
|
||||
|
|
@ -104,14 +104,14 @@ export default {
|
|||
this.$emit("update:modelValue", this.valueToEmit);
|
||||
},
|
||||
handleFocus() {
|
||||
handleInputFocus({
|
||||
handleButtonComponentFocus({
|
||||
groupName: this.groupName,
|
||||
});
|
||||
},
|
||||
handleBlur() {
|
||||
handleInputBlur({
|
||||
handleInputComponentBlur({
|
||||
groupName: this.groupName,
|
||||
onFocusCallback: this.handlePushClickEventToGACheck,
|
||||
onButtonQuestionLostFocusCallback: this.handlePushClickEventToGACheck,
|
||||
});
|
||||
},
|
||||
handlePushClickEventToGACheck(source) {
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
let lastFocusedInputGroupName = "";
|
||||
let onFocusCallback = null;
|
||||
|
||||
// TODO KO Add tests for this file
|
||||
const handleChildFocus = (e) => {
|
||||
const targetType = e.target.type;
|
||||
if (targetType !== "radio" && targetType !== "checkbox") {
|
||||
handleInputFocus({
|
||||
groupName: null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const handleInputFocus = (e) => {
|
||||
if (
|
||||
e &&
|
||||
lastFocusedInputGroupName !== e.groupName &&
|
||||
onFocusCallback
|
||||
) {
|
||||
onFocusCallback();
|
||||
}
|
||||
}
|
||||
|
||||
const handleInputBlur = (e) => {
|
||||
if (e) {
|
||||
lastFocusedInputGroupName = e.groupName;
|
||||
onFocusCallback = e.onFocusCallback;
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
handleChildFocus,
|
||||
handleInputFocus,
|
||||
handleInputBlur
|
||||
}
|
||||
Loading…
Reference in a new issue