paulrosen / abcjs

javascript for rendering abc music notation
Other
1.86k stars 275 forks source link

Unexpected scroll after click #868

Open ehsansh opened 1 year ago

ehsansh commented 1 year ago

When I click on a music note and analysis.clickedName in the click function has a valid note name everything is OK, but when the value is undefined, page scrolls up which is annoying. How could I solve it?

paulrosen commented 1 year ago

I'd have to debug to figure out what is happening here. I'm not sure. I don't know what is causing the scroll. You could start by commenting out your entire click handler and seeing what effect that has.

ehsansh commented 1 year ago

I removed clickListener but it doesn't work. Of course in order to get rid of this problem I wrote a function to disable page scroll and then enable it with setTimeout.