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

Regression in responsive between 4.0.5 and 4.0.6+ when i scroll right and down the full page - 1 solution provided #5832

Closed
eldy opened this issue Apr 18, 2020 · 2 comments

Comments

@eldy
Copy link

eldy commented Apr 18, 2020

Due to a change into select2.css, web pages are not correctly rendered on an android smartphone, as well as on chrome smartphone emulator when you try to scroll on right, when using 4.0.6 (tested on all version from 4.0.6 to 4.0.13: same trouble).

This is what i got with 4.0.5 (Correct): If i try to scroll on right, rendering stop at end of page.
image

And this is what I have with 4.0.6+ (Bad): If i try to scroll on right, rendering continue even if there is no content. Note that trouble is also on scroll down.
image

Solution:
If I restore the following line that was removed in 4.0.6, trouble is fixed (it fix also if i test the change on 4.0.13);

.select2-hidden-accessible {
  margin: -1px !important;                /* line to restore */
}

@eldy eldy changed the title Regression in responsive between 4.0.5 and 4.0.6+ + 1 solution provided Regression in responsive between 4.0.5 and 4.0.6+ when i scroll right and down - 1 solution provided Apr 18, 2020
@eldy eldy changed the title Regression in responsive between 4.0.5 and 4.0.6+ when i scroll right and down - 1 solution provided Regression in responsive between 4.0.5 and 4.0.6+ when i scroll right and down the full page - 1 solution provided Apr 18, 2020
@kevin-brown
Copy link
Member

This change landed in 2017 as 7ca9867 which was based on #4908.

I recognize that it causes an odd behaviour in your case, but it looks like you found a solution that works around that issue without requiring changes to Select2 itself (you can include that CSS in any of your files) which is a plus. Because it has been 3 years at this point, I'm going to close off this and acknowledge that anyone encountering this issue in the future will need to add back in this line of CSS.

eldy added a commit to Dolibarr/dolibarr that referenced this issue Dec 17, 2020
@eldy
Copy link
Author

eldy commented Dec 17, 2020

Update: The fix i suggested was working on most browser but i found some where the bad behaviour was still present.

Old fix

.select2-hidden-accessible {
  margin: -1px !important;                /* line to restore */
}

New fix: I fixed for all browsers with this change instead:

.select2-hidden-accessible {
  margin: -10000px !important;                /* line to restore */
}

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

2 participants