Commit 74468f1e authored by Marc Duez's avatar Marc Duez
Browse files

database.js : debug suggest_box > overflow / onblur event

parent afd70bc6
......@@ -1431,7 +1431,8 @@ select > option:hover {
border-color: #333333;
max-height: 100px;
display: none;
width: 250px;
width: 300px;
overflow-y: scroll;
}
.suggest_arrow {
position: absolute;
......
......@@ -1431,7 +1431,8 @@ select > option:hover {
border-color: #cccccc;
max-height: 100px;
display: none;
width: 250px;
width: 300px;
overflow-y: scroll;
}
.suggest_arrow {
position: absolute;
......
......@@ -1620,7 +1620,8 @@ select>option:hover {
border-color: @border;
max-height: 100px;
display: none;
width : 250px;
width: 300px;
overflow-y: scroll;
}
.suggest_arrow {
......
......@@ -922,9 +922,9 @@ function suggest_box(id, list) {
suggest_arrow.className = "suggest_arrow"
suggest_arrow.title = "show all suggestions"
suggest_arrow.onclick = function(){
input_box.focus()
suggest_list.style.display = "block"
suggest_list.innerHTML=""
input_box.focus()
for (var i=0; i<list.length; i++){
var suggestion = document.createElement("div")
suggestion.className = "suggestion"
......@@ -968,6 +968,9 @@ function suggest_box(id, list) {
//masque la liste
input_box.onblur = function(){
setTimeout(function(){suggest_list.style.display = "none"}, 200)
setTimeout(function(){
if (input_box !== document.activeElement)
suggest_list.style.display = "none"
}, 200)
};
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment