Merge pull request #4035 from xyflow/fix-context-menu-key-up

Fix context menu key up
This commit is contained in:
Moritz Klack
2024-04-03 16:38:50 +02:00
committed by GitHub
2 changed files with 12 additions and 0 deletions
@@ -40,6 +40,14 @@
return isKeyObject(key) ? key.key : key;
}
function resetAll() {
selectionKeyPressed.set(false);
multiselectionKeyPressed.set(false);
deleteKeyPressed.set(false);
panActivationKeyPressed.set(false);
zoomActivationKeyPressed.set(false);
}
$: selectionKeyDefinition = {
key: getKeyString(selectionKey),
modifier: getModifier(selectionKey)
@@ -67,6 +75,8 @@
</script>
<svelte:window
on:blur={resetAll}
on:contextmenu={resetAll}
use:shortcut={{
trigger: [
{