From 077d29e778c9c1bfe450785e8d25d3b46b57ba0e Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Wed, 17 Jul 2024 15:19:31 +1000 Subject: [PATCH] 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 --- source/Editor.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Editor.ts b/source/Editor.ts index 78762bb..425b39b 100644 --- a/source/Editor.ts +++ b/source/Editor.ts @@ -1255,6 +1255,7 @@ class Squire { if (!range) { range = this.getSelection(); } + moveRangeBoundariesDownTree(range); let seenAttributes = 0; let element: Node | null = range.commonAncestorContainer;