mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 00:46:01 +00:00
editor context menu, focus fix
This commit is contained in:
@@ -31,7 +31,13 @@
|
||||
|
||||
$: selectedIndex = true ? 0 : filter;
|
||||
|
||||
onMount(() => domInput.focus());
|
||||
onMount(() => {
|
||||
const oldFocus = document.activeElement;
|
||||
domInput.focus();
|
||||
return () => {
|
||||
if (oldFocus) oldFocus.focus();
|
||||
};
|
||||
});
|
||||
|
||||
$: sortedComands = _.sortBy(
|
||||
Object.values($commands).filter(x => x.enabled),
|
||||
|
||||
Reference in New Issue
Block a user