Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page scrolled after copying on iphone #320

Closed
oe opened this issue Oct 1, 2016 · 9 comments
Closed

page scrolled after copying on iphone #320

oe opened this issue Oct 1, 2016 · 9 comments

Comments

@oe
Copy link

oe commented Oct 1, 2016

Minimal example

To reproduce this bug, just open https://clipboardjs.com/ on Safari with iOS 10, and tap the last demo button Copy to clipboard, then the page should scroll down, but the clipboard is changed.

Expected behaviour

The web page should stay where it is.

Actual behaviour

Web page scrolled down. In my own project, the page scrolls up.

Browsers affected

I'm using Safari with iPhone 6s, iOS 10.

@zenorocha
Copy link
Owner

Hey @evecalm, thanks for reporting! Just pushed a fix for this, it's still not the best behavior possible but it's better than before. If you have any ideas, please send a pull request.

@kate-ivanova
Copy link

The scroll bug still remains in Safari iOS 10 (iPhone & iPad).

@zenorocha
Copy link
Owner

What version are you using @kkateivanova?

@kate-ivanova
Copy link

@zenorocha the latest - v1.5.15

@zenorocha
Copy link
Owner

Just tested clipboardjs.com on Safari iOS 10.0.2 and everything seems to be working fine.

@kate-ivanova
Copy link

Hey, @zenorocha, I've recorded a video - please, sorry for bad quality https://www.dropbox.com/s/6vv44mln6xyighx/iphone5s_clipboardjs.mov?dl=0.

Here my iPhone 5s, IOS 10.1, safari browser and site clipboardjs.com. There are two problems:

  1. When you push the button (without inputs) the screen dragged & scrolled - maybe it happens because keyboard fastly appears/disappears?
  2. When you push the button (with inputs) the screen scales to this inputs.
    The same problem in iPad ios 10.1

@a-x-
Copy link

a-x- commented Nov 22, 2016

scroll to top issue reproduces on safari and chrome on macos now

clipboard 1.5.15

fix:

            el.onclick =(e) => e.preventDefault();
            new Clipboard(el);

@jonashaag
Copy link

jonashaag commented Dec 12, 2016

I can reproduce this, iPhone 4S with latest iOS. It also doesn't copy the text but only scrolls.

Version: 1.5.15

jsfiddle: https://jsfiddle.net/mkg3x6xk/

@zenorocha
Copy link
Owner

This should be fixed on v1.6.0. Let me know if you guys are still having this problem or not.

cdll pushed a commit to x78w/clipboard.js that referenced this issue Jul 14, 2020
cdll added a commit to x78w/clipboard.js that referenced this issue Jul 14, 2020
This reverts commit 03eb059.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants