Permalink
Browse files

Added zindex options to dropdown so we can make sure it presents itse…

…lf on top of whatever is existing in the DOM
  • Loading branch information...
1 parent 55fd001 commit 1c339f711e24608df49bb572d654d426c014edf3 @pothibo committed Jun 14, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 select2.js
View
@@ -540,6 +540,7 @@
formatInputTooShort: function (input, min) { return "Please enter " + (min - input.length) + " more characters"; },
minimumResultsForSearch: 0,
minimumInputLength: 0,
+ zIndex: 2000,
@ivaynberg
ivaynberg Jun 14, 2012

this should be renamed to dropdownZIndex. zIndex by itself is not clear enough. also i would not have a default value for it. allow people to set it via css by default.

id: function (e) { return e.id; },
matcher: function(term, text) {
return text.toUpperCase().indexOf(term.toUpperCase()) >= 0;
@@ -654,7 +655,8 @@
this.dropdown.css({
top: offset.top + height,
left: offset.left,
- width: width
+ width: width,
+ "z-index": this.opts.zIndex
@ivaynberg
ivaynberg Jun 14, 2012

this line should only set it if it was defiend in opts

});
},

1 comment on commit 1c339f7

@pothibo
Owner

Give me a few minutes, i deleted the branch too soon :/

Please sign in to comment.