Skip to content

Conversation

@zolrath
Copy link

@zolrath zolrath commented Nov 30, 2022

Right now every single time text is selected a new event handler is added to the Save/Copy buttons.

This results in a huge number of event handlers being added to the buttons. In my testing after a few selections a single click on Copy the shutter action would be triggered 40+ times.

Here we move the UI setup to its own event and only trigger paste during the update event.

Before (single click after making multiple selections with CodeSnap-plus open)

multiple times

After (single click)

single call

Right now every single time text is selected a new event handler is added to the Save/Copy buttons.

This results in a huge number of event handlers being added to the buttons. In my testing after a few selections a single click on Copy the shutter action would be triggered 40+ times.

Here we move the event handler setup to its own event and read the config/paste on update events.
@zolrath zolrath force-pushed the fix-event-handler-repeated-binding branch from 4171a66 to 93a41f6 Compare December 1, 2022 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant