mirror of
https://github.com/zulip/zulip.git
synced 2026-06-12 21:00:58 +08:00
typeahead: Fix typeahead positioning for iOS keyboard case.
When the iOS keyboard is open and up, the positioning gotten by getBoundingClientRect will display a `top` value that is short by the height of the keyboard, which will usually end up placing things north of the top of the screen. By changing to jQuery $.fn.offset instead, the positioning appears to be correct in all cases; iOS keyboard up, down, and desktop usage. Fixes: #6366.
This commit is contained in:
parent
3b50bc82e0
commit
0c42e4a705
3
static/third/bootstrap/js/bootstrap.js
vendored
3
static/third/bootstrap/js/bootstrap.js
vendored
@ -1874,6 +1874,9 @@
|
||||
height: this.$element[0].offsetHeight
|
||||
})
|
||||
|
||||
// Zulip patch: Workaround for iOS safari problems
|
||||
pos.top = this.$element.offset().top;
|
||||
|
||||
var top_pos = pos.top + pos.height
|
||||
if (this.dropup) {
|
||||
top_pos = pos.top - this.$menu.outerHeight()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user