You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
In endOperation(), if the selection has changed, we call calculateScrollPos() to figure out how to scroll the selection into view. However, if the editor is hidden, calculateScrollPos() returns a bogus value, because display.scroller.clientHeight is 0. This value can end up getting saved off in doc.scrollTop, which then messes up future refresh() operations that try to use the cached value. (In our case, where we have a small hidden inline editor, the bad scroll value actually causes the content to become invisible, because it essentially scrolls the entire content out of view.)
We currently have an interim fix that simply skips the block containing the newScrollPos = calculateScrollPos(...) if display.scroller.clientHeight is 0. I can submit that as a pull request, but I suspect it's not the fix you'd want long term, because you probably do eventually want to scroll the cursor into view once the editor becomes visible again. (In our case, we don't happen to need that right now.) So perhaps you'd want to keep a flag indicating that the scroll should happen on the next refresh() (if the editor is visible at that point).
In
endOperation(), if the selection has changed, we callcalculateScrollPos()to figure out how to scroll the selection into view. However, if the editor is hidden,calculateScrollPos()returns a bogus value, becausedisplay.scroller.clientHeightis 0. This value can end up getting saved off indoc.scrollTop, which then messes up futurerefresh()operations that try to use the cached value. (In our case, where we have a small hidden inline editor, the bad scroll value actually causes the content to become invisible, because it essentially scrolls the entire content out of view.)We currently have an interim fix that simply skips the block containing the
newScrollPos = calculateScrollPos(...)ifdisplay.scroller.clientHeightis 0. I can submit that as a pull request, but I suspect it's not the fix you'd want long term, because you probably do eventually want to scroll the cursor into view once the editor becomes visible again. (In our case, we don't happen to need that right now.) So perhaps you'd want to keep a flag indicating that the scroll should happen on the nextrefresh()(if the editor is visible at that point).