I have an NSPanel Pro with a simple dashboard, on which there is a paper-buttons-row that is sidescrollable after adding overflow-x: scroll to the styles section.
The most used buttons are on the far left, and it is not reasonable that users scroll it back after accessing buttons out of sight.
So is it possible to have something listen to if it is scrolled, wait a set amount of time, and then scroll it back? ChatGPT was extremely confident but none of that stuff worked. Here is the basic card, and then just buttons repeated…
I was able to do this by adding a custom javascript resource with this script, it looks for the paper-buttons-row, and the flex-box within it, can probably be altered to work for other scrollable containers.
Can you give me a hint on how to add the custom javascript resource to a card. I would like to implement the same as you did,so that after a few seconds it scrols back to the first row.