App-bridge title bar action buttons event listeners doesn't clear on page reload

When using the action buttons in the Title Bar i.e.

<s-page heading="Edit Product">
  <s-button slot="primary-action" onClick="myFunction()">Add product</s-button>
</s-page>

the onclick event doesn’t clear when the page is reloaded.

when the app page is reloaded, the title bar doesn’t actually refresh and retains all the event listeners.

so with respect to the above code.

When the page first loads, myFunction() is called once when the user clicks the button.

If the page app iframe is redirected to another page with the same , or if the user reloads the frame, and then they click the button, myFunction() is called twice. And this increases with each page reload.

I will look into this. Is this an existing bug or just happens?

I’ve only recently noticed it, so think it’s new.

This is fixed. Thanks for reporting :folded_hands: