0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

insert menu of typeahead after input which it suggests on #3529

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
This commit is contained in:
fat 2012-12-07 18:59:13 -05:00
parent 437654030a
commit 1747caf19d
4 changed files with 7 additions and 7 deletions

View File

@ -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()
@ -56,7 +56,7 @@
}
, show: function () {
var pos = $.extend({}, this.$element.offset(), {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})

View File

@ -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()
@ -1775,7 +1775,7 @@
}
, show: function () {
var pos = $.extend({}, this.$element.offset(), {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})

File diff suppressed because one or more lines are too long

View File

@ -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()
@ -56,7 +56,7 @@
}
, show: function () {
var pos = $.extend({}, this.$element.offset(), {
var pos = $.extend({}, this.$element.position(), {
height: this.$element[0].offsetHeight
})