Description
Hey, as the title states i am struggling with this currently. I have a static grid and when resizing the item the page scrolls to the top of the page immediately. What could cause this?
This is my general setup:
Main component:
<Grid rows={20} cols={10} gap={8} class="w-full h-full grid-container z-10" bind:controller={gridController} > {#each items as item, id} <GridTypeItem {item} /> {/each} </Grid>
GridTypeItem component (simplified):
Script:
`function moveStart() {
console.log("moveStart");
document.body.classList.add("disable-selection");
}
function moveEnd() {
console.log("moveEnd");
document.body.classList.remove("disable-selection");
}`
`<GridItem
class="grid-item hover:bg-black/10 transition-colors rounded-md hover:dark:bg-slate-100/10"
id={item.id.toString()}
bind:x={item.x}
bind:y={item.y}
bind:w={item.w}
bind:h={item.h}
on:previewchange={moveStart}
on:change={moveEnd}
previewClass="bg-black/20 rounded-md"
- Commented content -
Is there anything known that could cause this?