0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -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,10 +2825,9 @@ proto.hasFormat = function ( tag, attributes, range ) {
var seenNode = false;
while ( node = walker.nextNode() ) {
if ( !getNearest( node, tag, attributes ) ) {
return false;
if ( getNearest( node, tag, attributes ) ) {
seenNode = true;
}
seenNode = true;
}
return seenNode;

File diff suppressed because one or more lines are too long

View file

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