Skip to content

Commit

Permalink
Revert "Fix dropdown showing out of viewport"
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuku TAKAHASHI committed Aug 26, 2016
1 parent 48d150d commit 0edb287
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,12 @@
},

_applyPlacement: function (position) {
position.height = Math.min(this.$el.parent().height(), $window.height());
// If the 'placement' option set to 'top', move the position above the element.
if (this.placement.indexOf('top') !== -1) {
// Overwrite the position object to set the 'bottom' property instead of the top.
position = {
top: 'auto',
bottom: position.height - position.top + position.lineHeight,
bottom: this.$el.parent().height() - position.top + position.lineHeight,
left: position.left
};
} else {
Expand Down

0 comments on commit 0edb287

Please sign in to comment.