diff --git a/js/fk.autocomplete.js b/js/fk.autocomplete.js
index 45de0cb2d..3f73c6fbb 100644
--- a/js/fk.autocomplete.js
+++ b/js/fk.autocomplete.js
@@ -20,11 +20,11 @@ function ACPopup(elm,backend_url){
h = $(elm).height();
}
else {
- style = $('.profile-jot-text').offset();
- w = 300;
- h = 150;
+ style = $(elm.container).offset();
+ w = elm.container.offsetWidth;
+ h = elm.container.offsetHeight;
+ }
- }
style.top=style.top+h;
style.width = w;
style.position = 'absolute';
@@ -73,7 +73,7 @@ ACPopup.prototype._search = function(){
that.cont.show();
$(data.items).each(function(){
html = "{1} ({2})".format(this.photo, this.name, this.nick)
- that.add(html, this.nick + '+' + this.id + ' - ' + this.link);
+ that.add(html, this.nick + '+' + this.id + ' - ' + this.link);
});
} else {
that.cont.hide();
@@ -82,16 +82,25 @@ ACPopup.prototype._search = function(){
});
}
-ACPopup.prototype.add = function(label, value){
+ ACPopup.prototype.add = function(label, value){
var that=this;
var elm = $("