fix(editor): restore focus after query tab switches
This commit is contained in:
2 files changed
+5
No files matched your search
@@ -47,6 +47,10 @@ describe("QueryEditor auto focus wiring", () => {
|
||||
it("enables auto focus for query tabs", () => {
|
||||
expect(contentAreaSource).toMatch(/<QueryEditor[\s\S]*?:\s*auto-focus="autoFocus !== false"\s[\s\S]*?:model-value="activeTab\.sql"/);
|
||||
});
|
||||
|
||||
it("restores focus when the active query tab changes", () => {
|
||||
expect(queryEditorSource).toMatch(/if \(tabId !== prevTabId\) \{[\s\S]*?activateTabDocument\(prevTabId, tabId, val\);[\s\S]*?if \(props\.autoFocus\) restoreEditorFocus\(\);/);
|
||||
});
|
||||
});
|
||||
|
||||
describe("QueryEditor toolbar focus", () => {
|
||||
|
||||
Reference in new issue
Block a user