mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-21 23:03:11 -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:
parent
aa29157969
commit
671319d316
1 changed files with 1 additions and 1 deletions
|
@ -710,7 +710,7 @@ class Squire {
|
||||||
? this._getPath(focus)
|
? this._getPath(focus)
|
||||||
: '(selection)'
|
: '(selection)'
|
||||||
: '';
|
: '';
|
||||||
if (this._path !== newPath) {
|
if (this._path !== newPath || anchor !== focus) {
|
||||||
this._path = newPath;
|
this._path = newPath;
|
||||||
this.fireEvent('pathChange', {
|
this.fireEvent('pathChange', {
|
||||||
path: newPath,
|
path: newPath,
|
||||||
|
|
Loading…
Reference in a new issue