[autocomplete] specify exact position
This commit is contained in:
parent
5f69545b65
commit
0eef0cc42b
1 changed files with 4 additions and 1 deletions
|
@ -110,7 +110,10 @@ function renderCompletions(element) {
|
|||
// insert the completion block after the element
|
||||
if(element.parentNode) {
|
||||
element.parentNode.insertBefore(completions_el, element.nextSibling);
|
||||
completions_el.style.width = element.clientWidth + 'px';
|
||||
let br = element.getBoundingClientRect();
|
||||
completions_el.style.width = br.width + 'px';
|
||||
completions_el.style.left = br.left + 'px';
|
||||
completions_el.style.top = (br.top + br.height) + 'px';
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
Reference in a new issue