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

IE9 width fix #269

Merged
merged 3 commits into from
Feb 16, 2015
Merged

IE9 width fix #269

merged 3 commits into from
Feb 16, 2015

Conversation

bengsfort
Copy link
Contributor

On a project where we are using Dropkick, a defect came through where on IE9 the dropdowns were 17px smaller than the container. After doing some research it looks like IE9 subtracts 17px for the scrollbar, and combined with overflow it unfortunately puts the scrollbar within the container, despite the 17px subtraction.

IE9 -17px width issue

To fix this without having to stop the width from being dynamic, you just have to change the width from 100% to having a min-width of 100%. To be safe, I also added declarations for width: auto; and right: 0;. This still forces the UL containing the options to fill the width of the container, even on IE9 when the scrollbar is supposed to take up 17px. The min-width allows the UL to expand passed the "new 100% width" IE9 gives it under these circumstances, and the right: 0; allows it to not expand past the edge of the container.

IE9 width fixed

I've been testing this on numerous browsers and devices and it ended up passing QA for our project, so I figured I'd share to help others avoid having to debug this in the future.

@@ -101,7 +102,8 @@ $dk-disabled-color: #BBBBBB !default;
}

.dk-select-options {
width: 100%;
min-width: 100%;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered background-color, border, border-radius, list-style, margin, max-height, min-width, overflow-x, overflow-y, padding, width, z-index

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah! haha Hey hound!

Matt Bengston added 2 commits February 16, 2015 13:31
Update  `.dk-select-options` with new property order.
@bengsfort
Copy link
Contributor Author

Doh. Forgot to to build, sorry about that.

@Robdel12
Copy link
Owner

@aesinv thanks! We'll get this merged and released!

Robdel12 pushed a commit that referenced this pull request Feb 16, 2015
@Robdel12 Robdel12 merged commit 1d40504 into Robdel12:master Feb 16, 2015
@bengsfort
Copy link
Contributor Author

No problem, thanks for the plugin!

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

Successfully merging this pull request may close these issues.

3 participants