mirror of
https://github.com/antonmedv/fx
synced 2024-11-03 15:40:12 +00:00
Hide on escape
This commit is contained in:
parent
b12ae5a243
commit
40f88dcc91
5
fx.js
5
fx.js
@ -285,8 +285,9 @@ module.exports = function start(filename, source) {
|
||||
if (typeof json === 'object' && json.constructor === Object) {
|
||||
const keys = Object.keys(json).filter(key => key.startsWith(match[1]))
|
||||
|
||||
// Don't show if there is complete match.
|
||||
if (keys.length === 1 && keys[0] === match[1]) {
|
||||
// Hide if there is nothing to show or
|
||||
// don't show if there is complete match.
|
||||
if (keys.length === 0 || (keys.length === 1 && keys[0] === match[1])) {
|
||||
autocomplete.hide()
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user