From 671319d316a231b5c46dbf9d39b97a1fb7b5b77f Mon Sep 17 00:00:00 2001 From: Neil Jenkins Date: Fri, 16 Aug 2024 15:59:43 +1000 Subject: [PATCH] Always fire pathChange event on selection change This lets you reliably hook into the pathChange event to know when to recalculate button state for bold, italic, etc. Resolves #465 --- source/Editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Editor.ts b/source/Editor.ts index f1655c0..78a4ba8 100644 --- a/source/Editor.ts +++ b/source/Editor.ts @@ -710,7 +710,7 @@ class Squire { ? this._getPath(focus) : '(selection)' : ''; - if (this._path !== newPath) { + if (this._path !== newPath || anchor !== focus) { this._path = newPath; this.fireEvent('pathChange', { path: newPath,