diff --git a/asset/js/widget/TermInput.js b/asset/js/widget/TermInput.js index 8285bc60..87539e59 100644 --- a/asset/js/widget/TermInput.js +++ b/asset/js/widget/TermInput.js @@ -162,6 +162,22 @@ define(["BaseInput"], function (BaseInput) { } } } + + onButtonClick(event) { + if (! this.hasSyntaxError()) { + let addedTerms = this.exchangeTerm(); + if (Object.keys(addedTerms).length) { + this.togglePlaceholder(); + event.preventDefault(); + this.autoSubmit(this.input, 'exchange', addedTerms); + this.ignoreSpaceUntil = null; + + return; + } + } + + super.onButtonClick(event); + } } return TermInput;