Custom action tool icon (wrongfully) initially active
- Dominant language
- TypeScript
- Stars
- 285
- Forks
- 307
- PR merge metrics
- No merged PRs in 30d
Description
I added a simple class toggling action as follows
```js
//...
config: {
actions: [
{
icon: ``,
name: "centered",
title: "Centered",
},
],
//...
```
The first time the tuning menu is displayed, the icon is active and clicking it correctly applies the `image-tool--centered` but the icon is set to inactive.


The next times the tuning menu is displayed the issue is gone and the icon's active state correctly reflects the presence of the css class.

Has line 87 of tunes.js anything to do with this behaviour?
```js
el.classList.toggle(this.CSS.buttonActive, toolData[tune.name]);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.