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"
|
name="route-fade"
|
||||||
mode="out-in">
|
mode="out-in">
|
||||||
<!-- The above durations should be kept in sync with the global css class "fade-on-route-transition" -->
|
<!-- 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>
|
</transition>
|
||||||
</router-view>
|
</router-view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { handleChildFocus } from "@/helpers/input-button-focus-helper"
|
import { handleAnyComponentFocus } from "@/helpers/button-question-focus-helper"
|
||||||
export default {
|
export default {
|
||||||
name: "app",
|
name: "app",
|
||||||
methods: {
|
methods: {
|
||||||
handleChildFocus: handleChildFocus
|
handleAnyComponentFocus: handleAnyComponentFocus
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
import { useField } from "vee-validate";
|
import { useField } from "vee-validate";
|
||||||
import { toRef } from "vue";
|
import { toRef } from "vue";
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
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";
|
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -104,14 +104,14 @@ export default {
|
||||||
this.$emit("update:modelValue", this.valueToEmit);
|
this.$emit("update:modelValue", this.valueToEmit);
|
||||||
},
|
},
|
||||||
handleFocus() {
|
handleFocus() {
|
||||||
handleInputFocus({
|
handleButtonComponentFocus({
|
||||||
groupName: this.groupName,
|
groupName: this.groupName,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleBlur() {
|
handleBlur() {
|
||||||
handleInputBlur({
|
handleInputComponentBlur({
|
||||||
groupName: this.groupName,
|
groupName: this.groupName,
|
||||||
onFocusCallback: this.handlePushClickEventToGACheck,
|
onButtonQuestionLostFocusCallback: this.handlePushClickEventToGACheck,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlePushClickEventToGACheck(source) {
|
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