Skip to content

Conversation

@altaudio
Copy link

  • We were experiencing a bug when we panned an image with an SVG overlay that made the scroll position jump to the top left position onDragStart. This was caused by the .getBoundingClientRect() function randomly returning unexpectedly low values which caused the scroll positions to be set to minus numbers.

  • To combat this I have modified the conditional on line 47 to set the bounds.width/height using scrollWidth/Height if any child nodes are present, rather than multiple child nodes. .getBoundingClientRect() is only used when no child nodes are present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants