mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-31 11:54:03 -05:00
Fix: Squire#hasFormat() did not recognize formats inside a multi-element selection.
This commit is contained in:
parent
0ec3c43791
commit
69523ec61c
3 changed files with 6 additions and 8 deletions
|
@ -2825,10 +2825,9 @@ 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
|
@ -701,10 +701,9 @@ 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;
|
||||||
|
|
Loading…
Reference in a new issue