Skip to content

Commit 8ef5e8c

Browse files
Hiding autocomplete when executing
1 parent c9708ed commit 8ef5e8c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"printableName": "Cache Web Terminal",
66
"description": "Web-based terminal emulator for Caché administering.",
77
"author": "ZitRo",
8-
"version": "4.0.0-beta.8",
8+
"version": "4.0.0-beta.9",
99
"gaID": "UA-83005064-2",
1010
"releaseNumber": 26,
1111
"scripts": {

src/client/js/input/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { process as processString } from "../parser";
88
import { showSuggestions } from "../autocomplete";
99
import * as config from "../config";
1010
import handlers from "./handlers";
11+
import hint from "../autocomplete/hint";
1112

1213
export let ENABLED = false,
1314
PROMPT_CLEARED = false;
@@ -168,7 +169,7 @@ export function getKey (options = {}, callback) {
168169
export function setCaretPosition (caretPos) {
169170
focusInput();
170171
if (elements.input.createTextRange) {
171-
var range = elements.input.createTextRange();
172+
let range = elements.input.createTextRange();
172173
range.move(`character`, caretPos);
173174
range.select();
174175
} else if (typeof elements.input.selectionStart !== "undefined") {
@@ -351,6 +352,7 @@ function onSubmit () {
351352
let value = elements.input.value, // value may change during onUserInput() call, keep on top
352353
firstVal = (lastParsedString[0] || {}).value;
353354
history.push(value);
355+
hint.hide();
354356
if (SPECIAL_ENABLED && firstVal === "/")
355357
return handlers.special(value, lastParsedString);
356358
handlers[terminal.MODE === Terminal.prototype.MODE_SQL ? "sql" : "normal"]

0 commit comments

Comments
 (0)