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