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 ) {
|
||||
nodeAfterSplit = nodeAfterSplit.parentNode;
|
||||
}
|
||||
var doc = self._doc,
|
||||
body = self._body;
|
||||
if ( nodeAfterSplit.offsetTop + nodeAfterSplit.offsetHeight >
|
||||
( doc.documentElement.scrollTop || body.scrollTop ) +
|
||||
body.offsetHeight ) {
|
||||
// 16 ~ one standard line height in px.
|
||||
if ( nodeAfterSplit.getBoundingClientRect().top + 16 >
|
||||
self._doc.documentElement.clientHeight ) {
|
||||
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 ) {
|
||||
nodeAfterSplit = nodeAfterSplit.parentNode;
|
||||
}
|
||||
var doc = self._doc,
|
||||
body = self._body;
|
||||
if ( nodeAfterSplit.offsetTop + nodeAfterSplit.offsetHeight >
|
||||
( doc.documentElement.scrollTop || body.scrollTop ) +
|
||||
body.offsetHeight ) {
|
||||
// 16 ~ one standard line height in px.
|
||||
if ( nodeAfterSplit.getBoundingClientRect().top + 16 >
|
||||
self._doc.documentElement.clientHeight ) {
|
||||
nodeAfterSplit.scrollIntoView( false );
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue