mirror of https://github.com/zulip/zulip.git
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
|
@ -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