0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-21 14:53:09 -05:00

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
This commit is contained in:
Neil Jenkins 2024-08-16 15:59:43 +10:00
parent aa29157969
commit 671319d316

View file

@ -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,