mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
UX: Take into account of header when rendering autocomplete.
This commit is contained in:
parent
b5d6d3c326
commit
5d2aa957b4
1 changed files with 10 additions and 6 deletions
|
@ -237,15 +237,19 @@ export default function(options) {
|
||||||
|
|
||||||
me.parent().append(div);
|
me.parent().append(div);
|
||||||
|
|
||||||
if(!isInput){
|
if (!isInput) {
|
||||||
vOffset = div.height();
|
vOffset = div.height();
|
||||||
}
|
|
||||||
|
|
||||||
if (Discourse.Site.currentProp('mobileView') && !isInput) {
|
if ((window.innerHeight - me.outerHeight() - $("header.d-header").innerHeight()) < vOffset) {
|
||||||
div.css('width', 'auto');
|
vOffset = -23;
|
||||||
|
}
|
||||||
|
|
||||||
if ((me.height() / 2) >= pos.top) { vOffset = -23; }
|
if (Discourse.Site.currentProp('mobileView')) {
|
||||||
if ((me.width() / 2) <= pos.left) { hOffset = -div.width(); }
|
div.css('width', 'auto');
|
||||||
|
|
||||||
|
if ((me.height() / 2) >= pos.top) { vOffset = -23; }
|
||||||
|
if ((me.width() / 2) <= pos.left) { hOffset = -div.width(); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var mePos = me.position();
|
var mePos = me.position();
|
||||||
|
|
Loading…
Reference in a new issue