Margin on .select2-container affects select2-dropdown #501

Closed
ghost opened this Issue Oct 15, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@ghost

ghost commented Oct 15, 2012

Master has introduced an unexpected behavior where the margin on the .select2-container causes additional padding to be placed on the dropdown.

You can see this reproduced here: http://jsfiddle.net/pivotaliex/Vt2A8/1/

The difference being that .first has no margin assigned, and .second does. The margin causes the dropdown size to become different to the select2-container.

We were able to rectify this on line 887

width = this.container.outerWidth(true),

becomes

width = this.container.outerWidth(false),

We've no idea of any side-effects of this change though.

Is there a documented testing strategy for select2?

Thanks.

ivaynberg closed this in 3ed9186 Oct 16, 2012

Contributor

ivaynberg commented Oct 16, 2012

there is no documented testing strategy. what i would like is to create unit tests, but its rather hard and very time consuming for a widget.

It seems, that this bug(or similar) is back: http://jsfiddle.net/Paul_Kozlovitch/j9Lqw0Lo/1/

@kevin-brown kevin-brown modified the milestone: 4.0, 3.3 Jan 28, 2015

kevin-brown reopened this Jan 28, 2015

Owner

kevin-brown commented Feb 24, 2015

Doesn't actually appear to be a bug, as we don't set a margin on the container and one shouldn't be set manually.

The container class also wraps the dropdown, so there isn't much we can do to counteract the forced margin.

@kevin-brown kevin-brown modified the milestone: 3.3, 4.0 Feb 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment