mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
offsets for find as you type names for PMS and Groups were crazy, change it so it renders the autocomplete below.
This commit is contained in:
parent
dbfd40da84
commit
7c73140674
1 changed files with 8 additions and 2 deletions
|
@ -131,16 +131,22 @@ $.fn.autocomplete = function(options) {
|
|||
return false;
|
||||
});
|
||||
var pos = null;
|
||||
var vOffset = 0;
|
||||
var hOffset = 0;
|
||||
if (isInput) {
|
||||
pos = {
|
||||
left: 0,
|
||||
top: 0
|
||||
};
|
||||
vOffset = -32;
|
||||
hOffset = 0;
|
||||
} else {
|
||||
pos = me.caretPosition({
|
||||
pos: completeStart,
|
||||
key: options.key
|
||||
});
|
||||
vOffset = div.height();
|
||||
hOffset = 27;
|
||||
}
|
||||
div.css({
|
||||
left: "-1000px"
|
||||
|
@ -150,8 +156,8 @@ $.fn.autocomplete = function(options) {
|
|||
var borderTop = parseInt(me.css('border-top-width'), 10) || 0;
|
||||
div.css({
|
||||
position: 'absolute',
|
||||
top: (mePos.top + pos.top - div.height() + borderTop) + 'px',
|
||||
left: (mePos.left + pos.left + 27) + 'px'
|
||||
top: (mePos.top + pos.top - vOffset + borderTop) + 'px',
|
||||
left: (mePos.left + pos.left + hOffset) + 'px'
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue