Skip to content

add "computedstyle" option for calculating the select width - #5259

Closed
campersau wants to merge 1 commit into
select2:developfrom
campersau:fix_3278
Closed

add "computedstyle" option for calculating the select width#5259
campersau wants to merge 1 commit into
select2:developfrom
campersau:fix_3278

Conversation

@campersau

Copy link
Copy Markdown

This pull request includes a

  • Bug fix
  • New feature
  • Translation

The following changes were made

  • add new "computedstyle" option for calculating the select width
  • added test
  • also added test to demonstrate that "resolve" does not work if parent is invisible

If this is related to an existing ticket, include a link to it as well.
fixes #3278

@stale

stale Bot commented Mar 13, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale

stale Bot commented Jul 6, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the status: stale label Jul 6, 2019
@kevin-brown kevin-brown removed this from the 4.0.8 milestone Jul 9, 2019
@stale stale Bot removed the status: stale label Jul 9, 2019
@kevin-brown kevin-brown added this to the 4.0.8 milestone Jul 9, 2019
kevin-brown pushed a commit that referenced this pull request Jul 9, 2019
This allows for more accurate resolution of the width when compared
to the `resolve` method. This is more relevant for jQuery 1.x, where
the `resolve` method cannot find the width of a hidden select box,
but it also applies to newer versions of jQuery where the `width()`
method provided by jQuery doesn't fully match `getComputedStyle()`.

Fixes #3278
Fixes #5502
Closes #5259
kevin-brown added a commit that referenced this pull request Jul 9, 2019
This allows for more accurate resolution of the width when compared
to the `resolve` method. This is more relevant for jQuery 1.x, where
the `resolve` method cannot find the width of a hidden select box,
but it also applies to newer versions of jQuery where the `width()`
method provided by jQuery doesn't fully match `getComputedStyle()`.

Fixes #3278
Fixes #5502
Closes #5259
maxwellfet928 pushed a commit to maxwellfet928/select2 that referenced this pull request Jun 8, 2026
This allows for more accurate resolution of the width when compared
to the `resolve` method. This is more relevant for jQuery 1.x, where
the `resolve` method cannot find the width of a hidden select box,
but it also applies to newer versions of jQuery where the `width()`
method provided by jQuery doesn't fully match `getComputedStyle()`.

Fixes select2#3278
Fixes select2#5502
Closes select2#5259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with responsive width

3 participants