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:
parent
437654030a
commit
1747caf19d
4
docs/assets/js/bootstrap-typeahead.js
vendored
4
docs/assets/js/bootstrap-typeahead.js
vendored
@ -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
|
||||
})
|
||||
|
||||
|
4
docs/assets/js/bootstrap.js
vendored
4
docs/assets/js/bootstrap.js
vendored
@ -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
|
||||
})
|
||||
|
||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
js/bootstrap-typeahead.js
vendored
4
js/bootstrap-typeahead.js
vendored
@ -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
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user