mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
focus fixes
This commit is contained in:
parent
e3aa4d54ef
commit
1bfa004e65
@ -365,7 +365,7 @@
|
||||
});
|
||||
const text = lines.join('\r\n');
|
||||
copyTextToClipboard(text);
|
||||
if (domFocusField) domFocusField.focus();
|
||||
// if (domFocusField) domFocusField.focus();
|
||||
}
|
||||
|
||||
export function loadNextDataIfNeeded() {
|
||||
|
@ -204,6 +204,7 @@
|
||||
onInsert: text => {
|
||||
const editor = domEditor.getEditor();
|
||||
editor.session.insert(editor.getCursorPosition(), text);
|
||||
domEditor?.getEditor()?.focus();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
export function copyTextToClipboard(text) {
|
||||
const oldFocus = document.activeElement;
|
||||
|
||||
const textArea = document.createElement('textarea');
|
||||
|
||||
//
|
||||
@ -53,4 +55,6 @@ export function copyTextToClipboard(text) {
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
if (oldFocus) oldFocus.focus();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user