feat: Render emojis panel before actually loading the emojis, b=no-bug, c=common, workspaces

This commit is contained in:
mr. m
2025-06-12 12:13:43 +02:00
parent 1f3d8b492b
commit 9c8b442a46
3 changed files with 7 additions and 6 deletions

View File

@@ -81,7 +81,8 @@
}
}
#onPopupShowing(event) {
// note: It's async on purpose so we can render the popup before processing the emojis
async #onPopupShowing(event) {
if (event.target !== this.#panel) return;
this.searchInput.value = '';
const emojiList = this.emojiList;
@@ -95,7 +96,9 @@
});
emojiList.appendChild(item);
}
this.searchInput.focus();
setTimeout(() => {
this.searchInput.focus();
}, 500);
}
#onPopupHidden(event) {

View File

@@ -74,6 +74,7 @@ body > #confetti {
.zen-emojis-picker-emoji {
appearance: none;
font-size: 14px;
padding: 0px !important;
& image {
display: none;
}

View File

@@ -186,6 +186,7 @@
}
)
.then(() => {
this.inputName.focus();
gZenWorkspaces.workspaceElement(this.workspaceId).hidden = false;
this.resolveInitialized();
});
@@ -199,10 +200,6 @@
workspace.containerTabId = this.currentProfile;
await gZenWorkspaces.saveWorkspace(workspace);
if (gZenVerticalTabsManager._canReplaceNewTab) {
BrowserCommands.openTab();
}
await this.#cleanup();
await gZenWorkspaces._organizeWorkspaceStripLocations(workspace, true);