mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Don't continue link over block break.
This commit is contained in:
parent
cfe9bea8b3
commit
ceed1cfa81
1 changed files with 8 additions and 0 deletions
|
@ -1232,6 +1232,14 @@
|
|||
var child = nodeAfterSplit.firstChild,
|
||||
next;
|
||||
|
||||
// Don't continue links over a block break; unlikely to be the
|
||||
// desired outcome.
|
||||
if ( nodeAfterSplit.nodeName === 'A' ) {
|
||||
nodeAfterSplit.replaceWith( nodeAfterSplit.empty() );
|
||||
nodeAfterSplit = child;
|
||||
continue;
|
||||
}
|
||||
|
||||
while ( child && child.nodeType === TEXT_NODE && !child.data ) {
|
||||
next = child.nextSibling;
|
||||
if ( !next || next.nodeName === 'BR' ) {
|
||||
|
|
Loading…
Reference in a new issue