0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-10 14:01:29 -05:00

🐛 Fix styles not being inherited (#5717)

This commit is contained in:
Aitor Moreno 2025-01-29 23:06:05 +01:00 committed by GitHub
parent a6485b93b7
commit 8145eb89d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -358,6 +358,16 @@ export class SelectionController extends EventTarget {
detail: this.#currentStyle,
})
);
} else {
const firstInline = this.#textEditor.root?.firstElementChild?.firstElementChild;
if (firstInline) {
this.#updateCurrentStyle(firstInline);
this.dispatchEvent(
new CustomEvent("stylechange", {
detail: this.#currentStyle,
}),
);
}
}
}