File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
resources/js/packages/ui/src/TimeTracker Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -96,13 +96,21 @@ const inputField = ref<HTMLInputElement | null>(null);
9696const timeRangeSelector = ref <HTMLElement | null >(null );
9797
9898function openModalOnTab(e : FocusEvent ) {
99+ pauseLiveTimerUpdate (e );
100+
99101 // check if the source is inside the dropdown
100102 const source = e .relatedTarget as HTMLElement ;
101103 if (source && window .document .body .querySelector <HTMLElement >(' #app' )?.contains (source )) {
102104 open .value = true ;
103105 }
104106}
105107
108+ function openModalOnClick(e : MouseEvent ) {
109+ pauseLiveTimerUpdate (e );
110+
111+ open .value = true ;
112+ }
113+
106114function focusNextElement(e : KeyboardEvent ) {
107115 if (open .value ) {
108116 e .preventDefault ();
@@ -135,8 +143,8 @@ function closeAndFocusInput() {
135143 data-testid =" time_entry_time"
136144 class =" w-[110px] lg:w-[130px] h-full text-text-primary py-2.5 rounded-lg border-border-secondary border text-center px-4 text-base lg:text-lg font-semibold bg-card-background border-none placeholder-muted focus:ring-0 transition"
137145 type =" text"
138- @focus =" pauseLiveTimerUpdate"
139146 @focusin =" openModalOnTab"
147+ @click =" openModalOnClick"
140148 @keydown.exact.tab =" focusNextElement"
141149 @keydown.exact.shift.tab =" open = false"
142150 @blur =" updateTimerAndStartLiveTimerUpdate"
You can’t perform that action at this time.
0 commit comments