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

Textarea Should Be Set to 12pt to Avoid Zoom-In On Phones #180

Closed
speedplane opened this issue Feb 4, 2016 · 4 comments
Closed

Textarea Should Be Set to 12pt to Avoid Zoom-In On Phones #180

speedplane opened this issue Feb 4, 2016 · 4 comments

Comments

@speedplane
Copy link

On phones, if you select text less than 12pt, the page automatically zooms in so you can have a closer look. Because clipboard.js selects a textarea text to do the copy, this also occurs. I understand that the user experience is less than stellar on a phone, but this would fix one corner case.

It can also be easily fixed in clipboard-action.js:

        this.fakeElem = document.createElement('textarea');
        this.fakeElem.style.position = 'absolute';
        this.fakeElem.style.fontSize = '12pt'; // <---- ADD THIS LINE
        this.fakeElem.style[ isRTL ? 'right' : 'left' ] = '-9999px';
        this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px';
        this.fakeElem.setAttribute('readonly', '');
        this.fakeElem.value = this.text;
@speedplane speedplane changed the title Textarea Should Be Set to 12pt to Avoid Zoom in On Phones Textarea Should Be Set to 12pt to Avoid Zoom-In On Phones Feb 4, 2016
@zenorocha
Copy link
Owner

Could you be more specific about which phones causes this problem? I tested on Android and it works fine.

@speedplane
Copy link
Author

Sorry... iPhone 6. This behavior is the source of much confusion:
http://stackoverflow.com/questions/2989263/disable-auto-zoom-in-input-text-tag-safari-on-iphone

@zenorocha
Copy link
Owner

Gotcha! I was able to reproduce this bug now. Could you send a PR?

@zenorocha
Copy link
Owner

Thanks @speedplane!

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

2 participants