0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Fix bug in removing empty inlines on delete.

This commit is contained in:
Neil Jenkins 2012-07-02 16:44:10 +10:00
parent e4b5ea6ee8
commit c964a6a564
2 changed files with 5 additions and 6 deletions

File diff suppressed because one or more lines are too long

View file

@ -1296,12 +1296,11 @@
var range = getSelection(), var range = getSelection(),
node = range.startContainer, node = range.startContainer,
parent; parent;
node = node.nodeType === TEXT_NODE ? if ( node.nodeType === TEXT_NODE ) {
node.length ? null : node.parentNode : node = node.parentNode;
node.isInline() && !node.textContent ? node : null; }
// If focussed in empty inline element // If focussed in empty inline element
if ( node ) { if ( node.isInline() && !node.textContent ) {
do { do {
parent = node.parentNode; parent = node.parentNode;
} while ( parent.isInline() && } while ( parent.isInline() &&