Skip to content

Introduce Reset Method

Compare
Choose a tag to compare
@ethanselzer ethanselzer released this 09 Jun 05:27
· 10 commits to master since this release

Invoking the reset method instructs react-cursor-position to recalculate its position relative to the page.
Use cases include a scenario where react-cursor-position is contained by a scrolling element and the element is scrolled to a new position, during an active session. In this scenario, react-cursor-position coordinates would be incorrect. Invoking reset corrects this issue.

See demo example for details.

May Fix #22