diff --git a/.gitignore b/.gitignore
index ce9b08ec5f..119e404204 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
lib/
_api-extractor-temp/
temp/
+.idea
# Logs
*.log
diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss
index a93e82f3f8..58c80b7d63 100644
--- a/packages/theme/styles/popups.scss
+++ b/packages/theme/styles/popups.scss
@@ -23,6 +23,10 @@
max-width: 17rem;
max-height: 22rem;
+ &:focus {
+ outline: 0;
+ }
+
&:not(.embedded) {
background: var(--theme-popup-color);
border: 1px solid var(--theme-popup-divider);
diff --git a/packages/ui/src/components/SelectPopup.svelte b/packages/ui/src/components/SelectPopup.svelte
index 75fe19828b..453a8eab5b 100644
--- a/packages/ui/src/components/SelectPopup.svelte
+++ b/packages/ui/src/components/SelectPopup.svelte
@@ -36,6 +36,7 @@
export let showShadow: boolean = true
export let embedded: boolean = false
+ let popupElement: HTMLDivElement | undefined = undefined
let search: string = ''
const dispatch = createEventDispatcher()
@@ -54,6 +55,11 @@
}
function onKeydown (key: KeyboardEvent): void {
+ if (key.code === 'Tab') {
+ dispatch('close')
+ key.preventDefault()
+ key.stopPropagation()
+ }
if (key.code === 'ArrowUp') {
key.stopPropagation()
key.preventDefault()
@@ -75,12 +81,19 @@
$: filteredObjects = value.filter((el) => (el.label ?? el.text ?? '').toLowerCase().includes(search.toLowerCase()))
$: huge = size === 'medium' || size === 'large'
+
+ $: if (popupElement) {
+ popupElement.focus()
+ }