mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
fix enter submits in the time range dropdown
This commit is contained in:
@@ -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<HTMLElement>(
|
||||
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
||||
);
|
||||
const focusableElement =
|
||||
timeRangeSelector.value?.querySelector<HTMLElement>(
|
||||
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
||||
);
|
||||
focusableElement?.focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user