Skip to content

Commit 01eef0f

Browse files
fix: modal position fix (#589)
* fix: type passed to redirect handler * fix: atb modal position reset when visible
1 parent 72d395f commit 01eef0f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

@kiva/kv-components/src/vue/KvAtbModal.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ import {
235235
computed,
236236
onMounted,
237237
onUnmounted,
238+
watch,
238239
} from 'vue';
239240
import { throttle } from '../utils/throttle';
240241
import KvCartModal from './KvCartModal.vue';
@@ -337,6 +338,7 @@ export default {
337338
],
338339
setup(props, { emit }) {
339340
const {
341+
modalVisible,
340342
addedLoan,
341343
userData,
342344
hasEverLoggedIn,
@@ -441,7 +443,13 @@ export default {
441443
}
442444
};
443445
444-
const updateHeaderPositionThrottled = throttle(updateHeaderPosition, 100);
446+
const updateHeaderPositionThrottled = throttle(updateHeaderPosition, 50);
447+
448+
watch(modalVisible, () => {
449+
if (modalVisible.value) {
450+
updateHeaderPosition();
451+
}
452+
}, { immediate: true });
445453
446454
onMounted(() => {
447455
updateHeaderPosition();

0 commit comments

Comments
 (0)