abcjs icon indicating copy to clipboard operation
abcjs copied to clipboard

Unexpected scroll after click

Open ehsansh opened this issue 2 years ago • 2 comments

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?

ehsansh avatar Jan 03 '23 21:01 ehsansh

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.

paulrosen avatar Jan 08 '23 17:01 paulrosen

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.

ehsansh avatar Jan 08 '23 19:01 ehsansh