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:
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;
|
||||
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
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue