From 86ee56cfac25c2515c871962ad8c38d23d50fa42 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 15 Apr 2024 23:49:13 -0400 Subject: [PATCH] Automatically focus collection name in New Collection window https://forums.zotero.org/discussion/113706/zotero-beta-7-adding-new-collection --- chrome/content/zotero/newCollectionDialog.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/newCollectionDialog.js b/chrome/content/zotero/newCollectionDialog.js index 7352ce12fa..068f993422 100644 --- a/chrome/content/zotero/newCollectionDialog.js +++ b/chrome/content/zotero/newCollectionDialog.js @@ -27,7 +27,9 @@ var Zotero_New_Collection_Dialog = { _handleLoad() { let io = window.arguments[0]; - document.querySelector('#name').value = io.name; + let nameElem = document.querySelector('#name'); + nameElem.value = io.name; + nameElem.select(); document.addEventListener('dialogaccept', () => this._handleAccept()); this._libraryID = io.libraryID;