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

Fix: Squire#hasFormat() did not recognize formats inside a multi-element selection.

This commit is contained in:
Gert K. Sønderby 2015-09-09 16:32:32 +02:00
parent 0ec3c43791
commit 69523ec61c
3 changed files with 6 additions and 8 deletions

View file

@ -2825,11 +2825,10 @@ proto.hasFormat = function ( tag, attributes, range ) {
var seenNode = false; var seenNode = false;
while ( node = walker.nextNode() ) { while ( node = walker.nextNode() ) {
if ( !getNearest( node, tag, attributes ) ) { if ( getNearest( node, tag, attributes ) ) {
return false;
}
seenNode = true; seenNode = true;
} }
}
return seenNode; return seenNode;
}; };

File diff suppressed because one or more lines are too long

View file

@ -701,11 +701,10 @@ proto.hasFormat = function ( tag, attributes, range ) {
var seenNode = false; var seenNode = false;
while ( node = walker.nextNode() ) { while ( node = walker.nextNode() ) {
if ( !getNearest( node, tag, attributes ) ) { if ( getNearest( node, tag, attributes ) ) {
return false;
}
seenNode = true; seenNode = true;
} }
}
return seenNode; return seenNode;
}; };