mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
fix TimeTrackerRangeSelector detection so it does not open the Dropdown again after pressing Escape
This commit is contained in:
@@ -139,7 +139,12 @@ const timeRangeSelector = ref<HTMLElement | null>(null);
|
|||||||
function openModalOnTab(e: FocusEvent) {
|
function openModalOnTab(e: FocusEvent) {
|
||||||
// check if the source is inside the dropdown
|
// check if the source is inside the dropdown
|
||||||
const source = e.relatedTarget as HTMLElement;
|
const source = e.relatedTarget as HTMLElement;
|
||||||
if (source && window.document.body.contains(source)) {
|
if (
|
||||||
|
source &&
|
||||||
|
window.document.body
|
||||||
|
.querySelector<HTMLElement>('#app')
|
||||||
|
?.contains(source)
|
||||||
|
) {
|
||||||
open.value = true;
|
open.value = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user