1
0
mirror of synced 2024-11-30 00:26:03 +03:00
select2/src/js
Kevin Brown ce38cd5b9c Allow the dropdown to point up
Up until now, the container could only have a dropdown that was
displayed below the container. While this worked well, there are
some cases where the dropdown should be displayed above the
container. Most notably, this is when the conatainer is displayed
towards the bottom of the page, and displaying the dropdown would
cause the page to be extended. Because we close the dropdown
when the page is scrolled, the user would not be able to access any
options that were displayed outside of the viewpoint.

Because of the order that events are fired, we attach the handlers
for repositioning the dropdown after results are displayed when the
container is opened for the first time.  This allows it to be
registered after the results container registers their events, so
the dropdown is repositioned after the results have been displayed.

The logic for determining the direction that the dropdown will be
shown in is very similar to the positioning code used in
Select2 3.x. Unlike previous versions of Select2, a class is used
to indicate the direction of the dropdown, even if it is displaying
below the container.

The themes provided with Select2 have been updated to correctly
render the dropdown in both directions.
2014-12-05 20:09:42 -05:00
..
select2 Allow the dropdown to point up 2014-12-05 20:09:42 -05:00
banner.json Added Translation object 2014-10-31 23:03:03 -04:00
jquery.select2.js Allow programmatic access of Select2 2014-10-21 21:44:01 -04:00
jquery.shim.js Linted select2/utils 2014-10-21 21:43:58 -04:00