Initially reported in plotly/plotly.R#525, I was able to isolate to a non-R JavaScript only example in codepen. I had hoped v1.7.0 would solve this, but unfortunately I just updated, and the problem persists.

I am happy to attempt to tackle this if desired. I see on line where it checks for firstRender to draw the legend. I'm wondering if we can handle by just removing this firstRender check.