mirror of
https://github.com/marktext/marktext.git
synced 2025-05-04 16:50:32 +08:00
remove magic number
This commit is contained in:
parent
d096819cae
commit
a43a8b0d12
@ -603,8 +603,9 @@ export default {
|
|||||||
|
|
||||||
// Used to fix #628: auto scroll cursor to visible if the cursor is too low.
|
// Used to fix #628: auto scroll cursor to visible if the cursor is too low.
|
||||||
if (container.clientHeight - y < 100) {
|
if (container.clientHeight - y < 100) {
|
||||||
// 740 is the lowest cursor position(till to top) that editor allowed.
|
// editableHeight is the lowest cursor position(till to top) that editor allowed.
|
||||||
animatedScrollTo(container, container.scrollTop + (y - 740), 0)
|
const editableHeight = container.clientHeight - 100
|
||||||
|
animatedScrollTo(container, container.scrollTop + (y - editableHeight), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.selectionChange = changes
|
this.selectionChange = changes
|
||||||
|
Loading…
Reference in New Issue
Block a user