diff --git a/packages/builder/src/components/common/NavItem.svelte b/packages/builder/src/components/common/NavItem.svelte index ce641aa3fc..6b3b287704 100644 --- a/packages/builder/src/components/common/NavItem.svelte +++ b/packages/builder/src/components/common/NavItem.svelte @@ -20,8 +20,13 @@ let contentRef $: selected && contentRef && scrollToView() - function onIconClick(event) { - event.stopPropagation() + const onClick = () => { + scrollToView() + dispatch("click") + } + + const onIconClick = e => { + e.stopPropagation() dispatch("iconClick") } @@ -44,7 +49,7 @@ on:dragstart on:dragover on:drop - on:click + on:click={onClick} ondragover="return false" ondragenter="return false" > diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte index b4a79f4e9e..df4f8b6826 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte @@ -30,7 +30,9 @@ export let indent export let border + let folder let routeManuallyOpened = false + $: selectedScreen = $currentAsset $: allScreens = getAllScreens(route) $: filteredScreens = getFilteredScreens(allScreens, $screenSearchString) @@ -85,8 +87,7 @@