0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -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) { if (!range) {
range = this.getSelection(); range = this.getSelection();
} }
moveRangeBoundariesDownTree(range);
let seenAttributes = 0; let seenAttributes = 0;
let element: Node | null = range.commonAncestorContainer; let element: Node | null = range.commonAncestorContainer;