diff --git a/asset/js/widget/TermInput.js b/asset/js/widget/TermInput.js index fff518b9..c33e8f10 100644 --- a/asset/js/widget/TermInput.js +++ b/asset/js/widget/TermInput.js @@ -161,6 +161,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;