Problem description:
It seems that when selecting data, having the data or layout change dynamically (using restyle or relayout respectively) and then selecting additional data (by moving the 'handles') the event handler then goes into an infinite loop.
Likely, the relayout due to the reselect causes a reselect which causes a relayout which causes a reselect, etc. etc.
Plotly v2.13+ goes into infinite loop when selecting additional data using the 'handles'.
Notice how the 'handles' do not reappear after moving one at the end of gif (has gone into infinite loop):
Plotly below v2.13 has no issues because it is not possible to reselect data using the 'handles':
Minimum working example: MWE
Taken from the example documentation for select-event
Note that this is a problem for Plotly v2.13+, the original example uses v1.58 (as illustrated on that page) which doesn't seem to have the problem (because the selection 'handles' to select data in the plot are not implemented prior to v2.13)
So this seems to be a regression of some kind.
Steps to reproduce:
Run provided MWE
Using lasso select (or other select tool) select some data (first time should not give any problems)
When using Plotly v2.13+, in the selected data use the 'handles' to select additional data points
It is a combination of selection using the 'handles' AND a restyle/relayout.
If I disable the API call to restyle/relayout then selecting additional data using the 'handles' does not cause an infinite loop.
Problem description: It seems that when selecting data, having the data or layout change dynamically (using restyle or relayout respectively) and then selecting additional data (by moving the 'handles') the event handler then goes into an infinite loop. Likely, the relayout due to the reselect causes a reselect which causes a relayout which causes a reselect, etc. etc.
Plotly v2.13+ goes into infinite loop when selecting additional data using the 'handles'. Notice how the 'handles' do not reappear after moving one at the end of gif (has gone into infinite loop):![event2 gif](https://user-images.githubusercontent.com/3252193/215478544-ad0bf8da-9031-4100-8ca6-5119cd4284a2.gif)
Plotly below v2.13 has no issues because it is not possible to reselect data using the 'handles':![event1 gif](https://user-images.githubusercontent.com/3252193/215478535-f47739d7-6684-4069-8f83-f01c5f3b8ba2.gif)
Minimum working example: MWE Taken from the example documentation for select-event Note that this is a problem for Plotly v2.13+, the original example uses v1.58 (as illustrated on that page) which doesn't seem to have the problem (because the selection 'handles' to select data in the plot are not implemented prior to v2.13) So this seems to be a regression of some kind.
Steps to reproduce: