0
Fork 0
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:
Neil Jenkins 2011-12-09 14:27:37 +11:00
parent ceed1cfa81
commit aa8527fc2c

View file

@ -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;