refactor(datepicker): optimize focus handling and improve calendar positioning logic

This commit is contained in:
Matej Glasnák committed 2025-12-03 13:12:46 +01:00
1 parent a1e71006f0
commit 3e130c9a0d
3 files changed
+102 -183

No files matched your search

@@ -505,12 +505,6 @@ export default {
methods: {
// Override onDateOpen from VuetifyFixFocusMixin to add logging
onDateOpen($event) {
console.log(
'🟡 [z-task-modal] onDateOpen called at:',
new Date().toISOString(),
'with event:',
$event,
);
// Call the parent mixin's onDateOpen method
if (
VuetifyFixFocusMixin.methods &&
@@ -523,17 +517,6 @@ export default {
// Override onInputFocus from VuetifyFixFocusMixin to add logging
onInputFocus($event) {
const target = $event?.target;
console.log(
'🟡 [z-task-modal] onInputFocus called at:',
new Date().toISOString(),
'on:',
{
tagName: target?.tagName,
type: target?.type,
id: target?.id,
className: target?.className,
},
);
// Call the parent mixin's onInputFocus method
if (
VuetifyFixFocusMixin.methods &&
@@ -601,9 +584,6 @@ export default {
// CRITICAL: Prevent v-dialog autofocus BEFORE modal opens
this.preventInputFocus = true;
console.log(
'🟡 [z-task-modal] showModal - preventInputFocus set to true BEFORE modal opens',
);
this.visible = true;
this.timeblocks = [
@@ -620,9 +600,6 @@ export default {
// Reset after modal is fully rendered and v-dialog autofocus has been blocked
setTimeout(() => {
this.preventInputFocus = false;
console.log(
'🟡 [z-task-modal] showModal - preventInputFocus reset to false after 300ms',
);
}, 300);
});