Skip to content

Commit

Permalink
fix: keep focus in editor when closing color picker via ESC
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed May 20, 2022
1 parent 8cb912a commit 0b75001
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/plugins/value/components/ColorPicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
}
])
onClose()
}
function onClose() {
onSelect({ type: SELECTION_TYPE.VALUE, path })
}
Expand All @@ -53,6 +57,7 @@
openAbsolutePopup(ColorPickerPopup, props, {
anchor: event.target,
closeOnOuterClick: true,
onClose,
offsetTop: 18,
offsetLeft: -8,
height
Expand Down

0 comments on commit 0b75001

Please sign in to comment.