Closed yahelmanor closed 3 months ago
I wasn't able to reproduce the problem, but I have now finally installed a completely new version of the RoR Player that was in the making for a while but never completely finished. Could you verify whether the problem still occurs in the new version?
Closing the issue for now, please reopen if the issue still occurs.
Issue
When clicking on "show notes" in any tune and break it opens the windows twice, once immediately and once after about a second (the time vary from machine to machine), i suspect this is a bug and not a feature and this also lead to long loading time.
How to replicate
Just open https://player.rhythms-of-resistance.org/#/listen/Sambasso/ for example, click on the "show notes" of any of the tune or break, you should see a windows pop up immediately and after about a second it disappear and another one appear instead.
Some investigation
It seems the problem stems from the following line don't working exactly like it was expected.
In the function
setState
I think this was supped to suppress the event in
But what happen as far as i understand is that the
setTimeout
happens first instead of theEvenListner
.Possible solution
Maybe in
setState
we can add some variable of the hash that should be skipped, and just skip it in thewindow.addEventListener
but i really not sure.