mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
parent
85c9002ce5
commit
162ec9049e
3 changed files with 8 additions and 12 deletions
|
@ -1395,11 +1395,9 @@ var keyHandlers = {
|
||||||
if ( nodeAfterSplit.nodeType === TEXT_NODE ) {
|
if ( nodeAfterSplit.nodeType === TEXT_NODE ) {
|
||||||
nodeAfterSplit = nodeAfterSplit.parentNode;
|
nodeAfterSplit = nodeAfterSplit.parentNode;
|
||||||
}
|
}
|
||||||
var doc = self._doc,
|
// 16 ~ one standard line height in px.
|
||||||
body = self._body;
|
if ( nodeAfterSplit.getBoundingClientRect().top + 16 >
|
||||||
if ( nodeAfterSplit.offsetTop + nodeAfterSplit.offsetHeight >
|
self._doc.documentElement.clientHeight ) {
|
||||||
( doc.documentElement.scrollTop || body.scrollTop ) +
|
|
||||||
body.offsetHeight ) {
|
|
||||||
nodeAfterSplit.scrollIntoView( false );
|
nodeAfterSplit.scrollIntoView( false );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -246,11 +246,9 @@ var keyHandlers = {
|
||||||
if ( nodeAfterSplit.nodeType === TEXT_NODE ) {
|
if ( nodeAfterSplit.nodeType === TEXT_NODE ) {
|
||||||
nodeAfterSplit = nodeAfterSplit.parentNode;
|
nodeAfterSplit = nodeAfterSplit.parentNode;
|
||||||
}
|
}
|
||||||
var doc = self._doc,
|
// 16 ~ one standard line height in px.
|
||||||
body = self._body;
|
if ( nodeAfterSplit.getBoundingClientRect().top + 16 >
|
||||||
if ( nodeAfterSplit.offsetTop + nodeAfterSplit.offsetHeight >
|
self._doc.documentElement.clientHeight ) {
|
||||||
( doc.documentElement.scrollTop || body.scrollTop ) +
|
|
||||||
body.offsetHeight ) {
|
|
||||||
nodeAfterSplit.scrollIntoView( false );
|
nodeAfterSplit.scrollIntoView( false );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue