select2-bootstrap-css icon indicating copy to clipboard operation
select2-bootstrap-css copied to clipboard

Select not exactly

Open Medik18 opened this issue 10 years ago • 4 comments

How much select not displayed exactly? Browser: Google Chrome 39.0.2171.95 m Screen resolution: 1920x1080px

2014-12-24 12 25 09

Medik18 avatar Dec 24 '14 09:12 Medik18

search for the function positionDropdown (line 1232 +/-) and make the variable width receive the function below. this.container[0].getBoundingClientRect().width That solve my problem, but I think that exist anothers places to replace it.

Cheers!

larodiel avatar Jan 22 '15 19:01 larodiel

@larodiel that seemed to solve the problem with the right side of the dropdown but I still get the original 1px inconsistency on the left side. For me, if I open a dropdown and resize the window it becomes easier to see how it can change, sometimes it looks perfect. Also I saw a similar thread over on StackOverflow: http://stackoverflow.com/q/21497529/2184705

Here's another example of what mine looks like when both are wrong. image

wphampton avatar Feb 12 '15 16:02 wphampton

Hey guys – looks like #49 again. Please see also https://github.com/select2/select2/issues/1892 and https://github.com/select2/select2/issues/2049.

Does the issue persist if you remove select2-bootstrap.css? If yes, would it make sense to report your issue over at https://github.com/select2/select2?

fk avatar Apr 01 '15 03:04 fk

So taking a closer look at this it I don't think it has anything to do with the css styles.

IMO, it has to do with the way Select2 functions, the element is being overlayed on top of the input field and it's absolute positioning is being determined by js.

The issue happens when the screen size is set at an odd number, in my example 1585px, if the width was able to be set to 262.5px the issue would be resolved.

I kinda think this issue falls in the select2 camp.

screen shot 2015-04-07 at 7 00 58 pm

screen shot 2015-04-07 at 7 07 36 pm

ryanbeymer avatar Apr 08 '15 01:04 ryanbeymer