Skip to content

Commit

Permalink
insert menu of typeahead after input which it suggests on #3529
Browse files Browse the repository at this point in the history
note: this will likely break things for people in the same way that doing
this to tooltip did… however we think this is a better insertion model for
z-index,scrolling,modal,etc. applications
  • Loading branch information
fat committed Dec 7, 2012
1 parent 4376540 commit 1747caf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/assets/js/bootstrap-typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.$menu = $(this.options.menu).appendTo('body')
this.$menu = $(this.options.menu).insertAfter(this.$element)
this.source = this.options.source
this.shown = false
this.listen()
Expand All @@ -56,7 +56,7 @@
}

, show: function () {
var pos = $.extend({}, this.$element.offset(), {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})

Expand Down
4 changes: 2 additions & 2 deletions docs/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.$menu = $(this.options.menu).appendTo('body')
this.$menu = $(this.options.menu).insertAfter(this.$element)
this.source = this.options.source
this.shown = false
this.listen()
Expand All @@ -1775,7 +1775,7 @@
}

, show: function () {
var pos = $.extend({}, this.$element.offset(), {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})

Expand Down
Loading

0 comments on commit 1747caf

Please sign in to comment.