summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.html2
-rw-r--r--src/view/completer.js4
2 files changed, 5 insertions, 1 deletions
diff --git a/index.html b/index.html
index efb3e556..81c7491c 100644
--- a/index.html
+++ b/index.html
@@ -47,7 +47,7 @@
<input class="input-bar" id="textanalyser" placeholder="Add nodes and relationships"/>
<button class="add-button"></button>
</form>
- <div class="suggestion">
+ <div class="suggestion" style="display: none">
</div>
</div>
<div class="info-container">
diff --git a/src/view/completer.js b/src/view/completer.js
index 7cf20d05..675774d8 100644
--- a/src/view/completer.js
+++ b/src/view/completer.js
@@ -68,6 +68,7 @@ var completer = (function (input_element, dropdown) {
var hash = text.slice(0, cursor).lastIndexOf(triggerStart);
// TODO check if current completion has been invalidated
_invalidateSelection();
+ dropdown.hide();
dropdown_raw.innerHTML = ""; // remove all elements
if (hash == -1) {
return;
@@ -87,6 +88,9 @@ var completer = (function (input_element, dropdown) {
});
completion_start = hash + 1;
completion_end = space;
+ if (dropdown.children().length > 0) {
+ dropdown.show();
+ }
}
function _invalidateSelection() {