diff --git a/src/renderer/views/app/components/AddressBar/index.tsx b/src/renderer/views/app/components/AddressBar/index.tsx index 955ddfe9e..d34f5b8ee 100644 --- a/src/renderer/views/app/components/AddressBar/index.tsx +++ b/src/renderer/views/app/components/AddressBar/index.tsx @@ -75,7 +75,14 @@ const onKeyDown = (e: React.KeyboardEvent) => { const { value } = e.currentTarget; let url = value; - if (isURL(value)) { + if (value.trim() === '') { + callViewMethod( + store.tabs.selectedTabId, + 'loadURL', + 'https://tab.innatical.com', + ); + return; + } else if (isURL(value)) { url = value.indexOf('://') === -1 ? `http://${value}` : value; } else { url = store.settings.searchEngine.url.replace('%s', value); diff --git a/src/renderer/views/app/components/RightButtons/index.tsx b/src/renderer/views/app/components/RightButtons/index.tsx index 06a249903..0aca6fd13 100644 --- a/src/renderer/views/app/components/RightButtons/index.tsx +++ b/src/renderer/views/app/components/RightButtons/index.tsx @@ -30,8 +30,8 @@ const onDownloadsClick = async (e: React.MouseEvent) => { const showMenuDialog = async () => { const { right, bottom } = menuRef?.getBoundingClientRect() ?? { - right: 0, - bottom: 0, + right: 1000, + bottom: 50, }; ipcRenderer.send(`show-menu-dialog-${store.windowId}`, right, bottom); }; @@ -93,7 +93,7 @@ export const RightButtons = observer(() => { )} {store.isIncognito && } (store.addTab.ref = r)} + divRef={(r: any) => (menuRef = r)} toggled={store.dialogsVisibility['menu']} badge={store.updateAvailable} badgeRight={10} diff --git a/src/renderer/views/app/models/tab.ts b/src/renderer/views/app/models/tab.ts index 1fa23c544..5407eee65 100644 --- a/src/renderer/views/app/models/tab.ts +++ b/src/renderer/views/app/models/tab.ts @@ -42,7 +42,7 @@ export class ITab { public isPlaying = false; - public title = 'New tab'; + public title = 'New Tab'; public loading = true; diff --git a/src/renderer/views/app/store/tabs.ts b/src/renderer/views/app/store/tabs.ts index d8b23c5b0..89644a717 100644 --- a/src/renderer/views/app/store/tabs.ts +++ b/src/renderer/views/app/store/tabs.ts @@ -252,8 +252,9 @@ export class TabsStore { const frame = () => { if (!this.scrollingToEnd) return; + if (!this.containerRef?.current?.scrollWidth) return; this.containerRef.current.scrollLeft = - this.containerRef.current?.scrollWidth ?? 0; + this.containerRef.current?.scrollWidth || 0; requestAnimationFrame(frame); };