Palette behaviour (moves or expands)

When we drag an item from the palette and hold it within the bounds of the palette near the edges, the palette seems to move/expand. How can we stop this from happening? We have also made sure to disable myPalette.allowHorizontalScroll.

Are you saying that the HTML DIV element holding the Palette gets larger? That is very odd – as far as I know the GoJS code never modifies the size of the DIV. Perhaps you have some event handler doing that?

Have you enabled modification of the Palette? That could cause the expansion of the diagram’s document (but not of the DIV).

Or are you saying that the palette is auto-scrolling? If so, try setting Diagram | GoJS API to have a zero Margin.right. But in my tests just now, this should not be a problem either in the default configuration of a Palette.

Setting the autoScrollRegion worked for me. Thanks.

How do you limit auto-scrolling only to the vertical bounds? In my canvas, i should not be able to drag/drop components above or below the visible area. But it should be allowed in the horizontal direction. I should be able to add more components or drag components outside the left/right bounds as I have a horizontal scroll bar. How can i achieve this?

Maybe you want to set on your Diagram:
{ autoScrollRegion: new go.Margin(0, 16) }