mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Fix bug in FF on enter.
This commit is contained in:
parent
a91df2db4c
commit
953ee3bfc7
2 changed files with 5 additions and 1 deletions
|
@ -1002,6 +1002,8 @@ document.addEventListener( 'DOMContentLoaded', function () {
|
|||
splitTag = nextTag[ tag ],
|
||||
nodeAfterSplit;
|
||||
|
||||
// If this is a malformed bit of document, just play it safe
|
||||
// and insert a <br>.
|
||||
if ( !block ) {
|
||||
range._insertNode( createElement( 'BR' ) );
|
||||
range.collapse( false );
|
||||
|
|
|
@ -107,6 +107,8 @@ implement( Text, {
|
|||
getLength: function () {
|
||||
return this.length;
|
||||
},
|
||||
// The text node is essentially its own contents.
|
||||
empty: function () { return this; },
|
||||
isLike: function ( node ) {
|
||||
return node.nodeType === TEXT_NODE;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue