Skip to content

Commit 9c8b442

Browse files
committed
feat: Render emojis panel before actually loading the emojis, b=no-bug, c=common, workspaces
1 parent 1f3d8b4 commit 9c8b442

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/zen/common/emojis/ZenEmojiPicker.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
}
8282
}
8383

84-
#onPopupShowing(event) {
84+
// note: It's async on purpose so we can render the popup before processing the emojis
85+
async #onPopupShowing(event) {
8586
if (event.target !== this.#panel) return;
8687
this.searchInput.value = '';
8788
const emojiList = this.emojiList;
@@ -95,7 +96,9 @@
9596
});
9697
emojiList.appendChild(item);
9798
}
98-
this.searchInput.focus();
99+
setTimeout(() => {
100+
this.searchInput.focus();
101+
}, 500);
99102
}
100103

101104
#onPopupHidden(event) {

src/zen/common/styles/zen-single-components.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ body > #confetti {
7474
.zen-emojis-picker-emoji {
7575
appearance: none;
7676
font-size: 14px;
77+
padding: 0px !important;
7778
& image {
7879
display: none;
7980
}

src/zen/workspaces/ZenWorkspaceCreation.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@
186186
}
187187
)
188188
.then(() => {
189+
this.inputName.focus();
189190
gZenWorkspaces.workspaceElement(this.workspaceId).hidden = false;
190191
this.resolveInitialized();
191192
});
@@ -199,10 +200,6 @@
199200
workspace.containerTabId = this.currentProfile;
200201
await gZenWorkspaces.saveWorkspace(workspace);
201202

202-
if (gZenVerticalTabsManager._canReplaceNewTab) {
203-
BrowserCommands.openTab();
204-
}
205-
206203
await this.#cleanup();
207204

208205
await gZenWorkspaces._organizeWorkspaceStripLocations(workspace, true);

0 commit comments

Comments
 (0)