From d487bb5a96e3a0b79e327331236a469e4e507641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Malinowski?=
Date: Mon, 8 Nov 2021 14:59:51 +0100
Subject: [PATCH] fix(Tooltip): fix two way binding in cases where icon is in
focus
---
src/Tooltip/Tooltip.svelte | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Tooltip/Tooltip.svelte b/src/Tooltip/Tooltip.svelte
index b206c869..590ac926 100644
--- a/src/Tooltip/Tooltip.svelte
+++ b/src/Tooltip/Tooltip.svelte
@@ -73,7 +73,7 @@
setContext("Tooltip", { tooltipOpen });
function onKeydown(e) {
- if (e.key === "Escape") {
+ if (e.key === "Escape" || e.key === "Tab") {
e.stopPropagation();
open = false;
} else if (e.key === " " || e.key === "Enter") {
@@ -206,7 +206,6 @@
aria-describedby="{tooltipId}"
on:mousedown="{onMousedown}"
on:focus="{onFocus}"
- on:blur="{onBlur}"
on:keydown="{onKeydown}"
>