diff --git a/resources/js/packages/ui/src/Input/TimePickerSimple.vue b/resources/js/packages/ui/src/Input/TimePickerSimple.vue
index 40a71ebb..4ada723e 100644
--- a/resources/js/packages/ui/src/Input/TimePickerSimple.vue
+++ b/resources/js/packages/ui/src/Input/TimePickerSimple.vue
@@ -90,7 +90,6 @@ useFocus(timeInput, { initialValue: props.focus });
const inputValue = ref(
model.value ? getLocalizedDayJs(model.value).format('HH:mm') : null
);
-const open = ref(false);
@@ -102,16 +101,10 @@ const open = ref(false);
twMerge('text-center w-24 px-3 py-2', size === 'large' && 'w-28')
"
@blur="updateTime"
- @keydown.enter="
- updateTime($event);
- open = false;
- "
- @keydown.tab="open = false"
@focus="($event.target as HTMLInputElement).select()"
@mouseup="($event.target as HTMLInputElement).select()"
@click="($event.target as HTMLInputElement).select()"
@pointerup="($event.target as HTMLInputElement).select()"
- @focusin="open = true"
data-testid="time_picker_input"
type="text" />
diff --git a/resources/js/packages/ui/src/Input/TimeRangeSelector.vue b/resources/js/packages/ui/src/Input/TimeRangeSelector.vue
index 94516d5c..9ec8ac3a 100644
--- a/resources/js/packages/ui/src/Input/TimeRangeSelector.vue
+++ b/resources/js/packages/ui/src/Input/TimeRangeSelector.vue
@@ -1,5 +1,5 @@
@@ -59,7 +55,7 @@ function closeAndFocusButton() {
emit('changed', newStart, newEnd)
"
focus
- @close="closeAndFocusButton"
+ @close="open = false"
:start="start"
:end="end">
diff --git a/resources/js/packages/ui/src/TimeTracker/TimeTrackerRangeSelector.vue b/resources/js/packages/ui/src/TimeTracker/TimeTrackerRangeSelector.vue
index a4987c03..e3343ad2 100644
--- a/resources/js/packages/ui/src/TimeTracker/TimeTrackerRangeSelector.vue
+++ b/resources/js/packages/ui/src/TimeTracker/TimeTrackerRangeSelector.vue
@@ -28,8 +28,8 @@ function pauseLiveTimerUpdate(event: FocusEvent) {
function onTimeEntryEnterPress() {
updateTimerAndStartLiveTimerUpdate();
- //const activeElement = document.activeElement as HTMLElement;
- // activeElement?.blur();
+ const activeElement = document.activeElement as HTMLElement;
+ activeElement?.blur();
}
const currentTime = computed({
@@ -147,9 +147,10 @@ function openModalOnTab(e: FocusEvent) {
function focusNextElement(e: KeyboardEvent) {
if (open.value) {
e.preventDefault();
- const focusableElement = timeRangeSelector.value?.querySelector(
- 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
- );
+ const focusableElement =
+ timeRangeSelector.value?.querySelector(
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
+ );
focusableElement?.focus();
}
}