mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
Fix bug in removing format.
This commit is contained in:
parent
ceed1cfa81
commit
aa8527fc2c
1 changed files with 3 additions and 2 deletions
|
@ -529,8 +529,9 @@
|
||||||
// If not at least partially contained, wrap entire contents
|
// If not at least partially contained, wrap entire contents
|
||||||
// in a clone of the tag we're removing and we're done.
|
// in a clone of the tag we're removing and we're done.
|
||||||
if ( !range.containsNode( node, true ) ) {
|
if ( !range.containsNode( node, true ) ) {
|
||||||
// Ignore bookmarks
|
// Ignore bookmarks and empty text nodes
|
||||||
if ( node.nodeName !== 'INPUT' ) {
|
if ( node.nodeName !== 'INPUT' &&
|
||||||
|
( !isText || node.data ) ) {
|
||||||
toWrap.push([ exemplar, node ]);
|
toWrap.push([ exemplar, node ]);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue