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

IE Scrollbars on overflowY = "visible" #226

Closed
JoeMoon5 opened this issue May 5, 2015 · 3 comments
Closed

IE Scrollbars on overflowY = "visible" #226

JoeMoon5 opened this issue May 5, 2015 · 3 comments

Comments

@JoeMoon5
Copy link

JoeMoon5 commented May 5, 2015

I'm using the autosize plugin for our company intranet site, and our desktops have IE 10 and Chrome (latest version) installed.

In IE 10, I get visible, disabled scrollbars using the autosize plugin 3.0.2. I was using 1.8 previously and did not experience this issue. My temp work around was to change the following lines of code, located around line 86 in the update() function, replacing 'visible' with 'hidden'.

if (style.height !== ta.style.height) {
    if (ta.style.overflowY !== 'visible') {
        changeOverflow('visible');
        return;
    }
} 

Chrome and Firefox do not have this issue. I'm not able to test on IE 11. My temp fix doesn't seem to cause any additional issues.

@jackmoore
Copy link
Owner

There should be scrollbars when overflowY is set to visible, however the plugin shouldn't be setting the overflow to visible unless it determines the height being set exceeds the max-height.

So for whatever reason, the plugin seems to be calculating the wrong max-height for your site. I'm not sure I'll be able to fix it, since I can't reproduce the problem with IE10 and I don't see an obvious problem with the code. However, I do believe your report about the issue as I'm not surprised this might happen in IE.

@JoeMoon5
Copy link
Author

JoeMoon5 commented May 5, 2015

Here's the source of my text-area, which is a .Net server-side control. Maybe it will help with testing:

<textarea name="ctl00$ph_Column$txtMyTitle" class="textbox resizable" id="txtMyTitle" style="width: 95%; height: 32px; -ms-overflow-y: hidden;" rows="2" cols="20" data-autosize-on="true">Testing</textarea>

(Note: I'm calling autosize with autosize($('.resizable')), to affect all textareas with that class.)

Several of these things are auto-generated, like Height and the data-autosize-on. I notice the script exits out if that data attribute exists. Could that be the source of the problem?

EDIT: the data-autosize-on isn't added server side, but from the script. My mistake. I'm able to reproduce the behavior with a plain HTML textarea as well.

@adam-lynch
Copy link

+1. Found in IE11.

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

3 participants