Skip to content

Commit

Permalink
fixed dropdown positioning when select2 has margins. fixes #501
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaynberg committed Oct 16, 2012
1 parent 258a85b commit 3ed9186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions select2.js
Expand Up @@ -883,9 +883,9 @@ the specific language governing permissions and limitations under the Apache Lic
// abstract
positionDropdown: function() {
var offset = this.container.offset(),
height = this.container.outerHeight(true),
width = this.container.outerWidth(true),
dropHeight = this.dropdown.outerHeight(true),
height = this.container.outerHeight(false),
width = this.container.outerWidth(false),
dropHeight = this.dropdown.outerHeight(false),
viewportBottom = $(window).scrollTop() + document.documentElement.clientHeight,
dropTop = offset.top + height,
dropLeft = offset.left,
Expand Down

0 comments on commit 3ed9186

Please sign in to comment.