mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 12:56:00 +00:00
focus fixes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user