1
0
mirror of synced 2024-11-22 04:56:08 +03:00
select2/tests
Kevin Brown d9260254c1
Fix infinite scroll when the scrollbar is not visible (#5575)
Ever since the 4.0.0 release of Select2, there has been a bug where
if you enabled infinite scrolling but did not return enough results
on the first load of AJAX to show a scrollbar, then infinite
scrolling would not be enabled and you could not view anything other
than the first page of results. The solution for this was first
proposed in #3888 but it was closed off because of inactivity and
missing tests.

This fixes the issue by performing the check to see if more results
should be loaded both on scroll and also when the results are first
loaded. This solves the issue that we were seeing before, because
the plugin knows it needs to load in more results, just it did not
receive the scroll event before and thus was not able to actually
load in the new results.

This has the potential to trigger multiple AJAX requests to load in
multiple pages of results if the user has the ability to see many
options, but only a few are being loaded at a time.

This also adds tests for infinite scrolling, both to ensure that
it will attempt to load additional pages, even without the scrollbar,
and to ensure that the regular behaviour of not loading additional
pages when the scrollbar is visible is preserved.

Fixes #3088
2019-07-20 18:09:17 -04:00
..
a11y Add tests for accessible search results 2015-11-23 18:35:36 -05:00
data Test against jQuery 3.4.1 (#5531) 2019-06-25 22:05:15 -04:00
dropdown Test against jQuery 3.4.1 (#5531) 2019-06-25 22:05:15 -04:00
integration Fix tag creation being broken in 4.0.7 (#5558) 2019-07-09 19:13:03 -04:00
options Add computedstyle option for calculating the width (#5559) 2019-07-09 19:44:33 -04:00
results Fix infinite scroll when the scrollbar is not visible (#5575) 2019-07-20 18:09:17 -04:00
selection #4530 Add tooltip (title) to the 'remove all' 'X' icon. (#5291) 2018-09-15 16:22:54 -03:00
utils Combine tests into common files 2015-02-13 23:29:56 -05:00
vendor Test against jQuery 3.4.1 (#5531) 2019-06-25 22:05:15 -04:00
helpers.js Update grunt-contrib-qunit to latest version (#5530) 2019-06-04 22:43:52 -04:00
integration-jq1.html Restore compatibility with data-* attributes in jQuery 2.x (#5486) 2019-04-27 22:20:56 -04:00
integration-jq2.html Restore compatibility with data-* attributes in jQuery 2.x (#5486) 2019-04-27 22:20:56 -04:00
integration-jq3.html Test against jQuery 3.4.1 (#5531) 2019-06-25 22:05:15 -04:00
unit-jq1.html Fix infinite scroll when the scrollbar is not visible (#5575) 2019-07-20 18:09:17 -04:00
unit-jq2.html Fix infinite scroll when the scrollbar is not visible (#5575) 2019-07-20 18:09:17 -04:00
unit-jq3.html Fix infinite scroll when the scrollbar is not visible (#5575) 2019-07-20 18:09:17 -04:00