mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 20:34:52 +00:00
d62c32ba71
Prior to this fix using: - `replaceText(...)` - `selectText(..., ..., { scroll: true})` Wouldn't have the expected behaviour as the scroll from selectText will attempt to save the scroll position and restore it AFTER the replacement happened. This commit allows scroll to be a Boolean or a Number, when a number, it will be used to restore the scrollTop position. I tried to write tests for this specific behavior but couldn't reproduce the issue in tests.