mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
e68ec9d1df
refs https://github.com/TryGhost/Ghost/issues/9505 - when cursor changes through the normal `cursorDidChange` or through certain programmatic changes we trigger a check to see if the cursor is out of the viewport and scroll it into view if necessary - disable our scroll-into-view routine if the mouse button or shift key is down so that we don't interfere with default browser behaviour which works well in that situation - for scroll-into-view at the bottom there are two slightly different methods - if the cursor is near the bottom of the document we scroll so that the bottom padding of the editor is visible - if the cursor is mid-document then we scroll just enough to bring the cursor into the viewport |
||
---|---|---|
.. | ||
admin |