Skip to content

Commit 617983e

Browse files
committed
fix(home): pin mirror div to document origin and guard button anchor
1 parent 68986c3 commit 617983e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export const PlusMenuDropdown = React.memo(
4646
setAnchorPos(anchor)
4747
} else {
4848
const rect = buttonRef.current?.getBoundingClientRect()
49-
if (rect) setAnchorPos({ left: rect.left, top: rect.bottom })
49+
if (!rect) return
50+
setAnchorPos({ left: rect.left, top: rect.top })
5051
}
5152
setOpen(true)
5253
setSearch('')

apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ function getCaretAnchor(
5959

6060
const mirror = document.createElement('div')
6161
mirror.style.position = 'absolute'
62+
mirror.style.top = '0'
63+
mirror.style.left = '0'
6264
mirror.style.visibility = 'hidden'
6365
mirror.style.whiteSpace = 'pre-wrap'
6466
mirror.style.overflowWrap = 'break-word'

apps/sim/lib/auth/hybrid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const BEARER_PREFIX = 'Bearer '
2525
export function hasExternalApiCredentials(headers: Headers): boolean {
2626
if (headers.has(API_KEY_HEADER)) return true
2727
const auth = headers.get('authorization')
28-
return auth?.startsWith(BEARER_PREFIX) ?? false
28+
return auth?.startsWith(BEARER_PREFIX)
2929
}
3030

3131
export interface AuthResult {

0 commit comments

Comments
 (0)