mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 08:31:43 +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 |
||
---|---|---|
.. | ||
atoms.js | ||
cards.js | ||
key-commands.js | ||
parser-plugins.js | ||
text-expansions.js |