Chrome (Windows) has weird scroll-jump behaviour?
See original GitHub issueIncorrect Behaviour
When a page has lots of elements with the data-clipboard-text set, clicking one of these elements causes the page scroll to jump downwards. At the top of the webpage, if you click an element, there is no jump at all. The further down the page you are, the larger the scroll-jump is when you click an element.
Minimal example
https://jsfiddle.net/65gjsbok/ To see the effect in action, use Chrome on Windows, and scroll about half-way down the page of emojis, then click an emoji. On my computer, the page scoll instantly jumps downwards to near the bottom of the page.
Expected behaviour
I’d expect that the page scroll should not “jump” when clicking an element with data-clipboard-text.
Browsers affected
I tested on Chrome (Android), Chrome (Windows) and Mozilla (Windows). It appears that it only affects Chrome (Windows).
Other notes
This here is a modified fiddle which packs all the emojis up as high as possible, but has a “filler” div which enables the page to be very long still. It shows that this problem is dependant on the current scroll position. If you scroll down a bit, then click an icon, you’ll see a very small jump.
Hopefully this is just something silly that I’m doing! But it’s weird that it’s only happening on Chrome on Windows.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (7 by maintainers)

Top Related StackOverflow Question
Sorry to disappoint you, but I had 2 nightmarish days, until I’ve found this issue (last thing that I’ve expected was problem with module 😃 Problem was in Safari, and Firefox, but, funny, not in Chrome…
We have a (jquery) context menu (right click), where some id or password is hidden and user should copy it. When you click on context menu, page jumps to the top…
I tried to upgrade, but it didn’t help… So I removed the line:
// Move element to the same position verticallythis.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px';and jumping stopped
I’m in a bit of a hurry now, so I don’t have time to think about consequences, but do we really need that line?
Got it. Problem identified and fixed at
v1.5.11.