fix scrolling menus (#977)
* attempt to fix scrolling menus * add container to keyboard shortuts Co-authored-by: Judicael <46365844+judicaelandria@users.noreply.github.com>
This commit is contained in:
parent
8f2dba8311
commit
0e8e000f79
3 changed files with 5 additions and 3 deletions
|
@ -84,7 +84,7 @@ function _Canvas<T extends TLShape, M extends Record<string, unknown>>({
|
|||
|
||||
rZoomRef.current = pageState.camera.zoom
|
||||
|
||||
useZoomEvents(rZoomRef, externalContainerRef || rCanvas)
|
||||
useZoomEvents(rZoomRef, rCanvas)
|
||||
|
||||
useResizeObserver(rCanvas, onBoundsChange)
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ export function DMContent({
|
|||
const container = useContainer()
|
||||
|
||||
return (
|
||||
<DropdownMenu.Portal container={overflow ? undefined : container.current} dir="ltr">
|
||||
<DropdownMenu.Portal container={container.current} dir="ltr">
|
||||
<DropdownMenu.Content
|
||||
align={align}
|
||||
alignOffset={alignOffset}
|
||||
|
|
|
@ -6,6 +6,7 @@ import { IconButton } from '~components/Primitives/IconButton'
|
|||
import { Kbd } from '~components/Primitives/Kbd'
|
||||
import { RowButton } from '~components/Primitives/RowButton'
|
||||
import { breakpoints } from '~components/breakpoints'
|
||||
import { useContainer } from '~hooks'
|
||||
import { styled } from '~styles'
|
||||
|
||||
export function KeyboardShortcutDialog({
|
||||
|
@ -14,6 +15,7 @@ export function KeyboardShortcutDialog({
|
|||
onOpenChange?: (open: boolean) => void
|
||||
}) {
|
||||
const intl = useIntl()
|
||||
const container = useContainer()
|
||||
|
||||
const shortcuts = {
|
||||
Tools: [
|
||||
|
@ -89,7 +91,7 @@ export function KeyboardShortcutDialog({
|
|||
<FormattedMessage id="keyboard.shortcuts" />
|
||||
</RowButton>
|
||||
</Dialog.Trigger>
|
||||
<Dialog.Portal>
|
||||
<Dialog.Portal container={container.current}>
|
||||
<DialogOverlay />
|
||||
<DialogContent>
|
||||
<DialogTitle>
|
||||
|
|
Loading…
Reference in a new issue