Skip to content

Commit

Permalink
fix loading css bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JenniferKuo committed Nov 28, 2019
1 parent 883cb69 commit 62aab6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ html body {
max-width: 740px;
background-color: white;
padding: 56px 50px;
min-height: 700px;
min-height: 800px;
}
* { box-sizing: border-box; }
body {
Expand Down
10 changes: 10 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,16 @@ function showLoading(){
b.setAttribute("class", "autocomplete-items-child");
b.innerHTML = "<img src='ellipsis.gif' width='20px'>";
a.appendChild(b);

// 取得游標所在位置 把popup擺放到游標旁邊
if( $('.autocomplete-items').length ){
var tip = $('.autocomplete-items');
var pos = getCaretPosition();
tip.css({
left: pos.x + 10,
top: pos.y + 20
});
}
}

function autocomplete(inp, arr) {
Expand Down

0 comments on commit 62aab6f

Please sign in to comment.