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(),
node = range.startContainer,
parent;
node = node.nodeType === TEXT_NODE ?
node.length ? null : node.parentNode :
node.isInline() && !node.textContent ? node : null;
if ( node.nodeType === TEXT_NODE ) {
node = node.parentNode;
}
// If focussed in empty inline element
if ( node ) {
if ( node.isInline() && !node.textContent ) {
do {
parent = node.parentNode;
} while ( parent.isInline() &&