0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-21 23:03:11 -05:00

Move range down tree for font info

This means if the selection is equivalent to just being inside a text
node, you'll get back the font info.

Resolves #462
This commit is contained in:
Neil Jenkins 2024-07-17 15:19:31 +10:00
parent 333d5fbd09
commit 077d29e778

View file

@ -1255,6 +1255,7 @@ class Squire {
if (!range) {
range = this.getSelection();
}
moveRangeBoundariesDownTree(range);
let seenAttributes = 0;
let element: Node | null = range.commonAncestorContainer;