Interactions conflict when display type set to: none?

I’ve set up interactions for a toggle button,
when the “show” icon is clicked, the “hide” icon shows up and the "show " icon is hidden and vice versa.

But when the default state of the “hide” icon is set to display: none,
the interaction failed to show the " show " icon after a few clicks



Here’s the screencapture of the issue
https://imgur.com/a/Up5IArJ

Dear Neville,

I had a similar problem with the hide/show interaction when setting a button on display none. On the third click the buttons disappears.

André from the Bricks support team showed me this solution, which works in Bricks 1.8.4.

Instead of using the Hide / Show interactions create a class “hidden” (with display none) and use interactions add / remove this class on the respective elements.
Put the class .hidden on the element you wish to hide at pageload.

It could look like this

First interaction :

Trigger: click
action: set attribute
key: class
value: hidden (the name of your class without dot)
target: css selector
css selector: .yourclass

Second interaction:

Trigger: click
action: remove attribute
key: class
value: hidden (or the name of your class without dot)
target: css selector
css selector: .yourotherclass

You can add a third and fourth interaction if you want to show/hide more elements or the buttons.
Or write to André from the Bricks Team.