js: name changed while typing
there used to be a slight bug. Suppose the user types a text in the input box, and never changes the focus. Then, she press "Stop". the click and the focus lost happen in nearly the same moment, which leads to a race in which the name is set only if the /api/update arrives before the /api/generate. Sending the message before losing the focus mitigates the issue
This commit is contained in:
parent
0bad389a9e
commit
7df8d60f1b
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ $.widget("ror.ongoingrec", {
|
|||
);
|
||||
this._update();
|
||||
|
||||
view.on("change", "input", function(evt) {
|
||||
view.on("change keydown paste input", "input", function(evt) {
|
||||
console.log('change', evt);
|
||||
var prevrec = widget.options.rec;
|
||||
prevrec.name = $(evt.target).val();
|
||||
|
|
Loading…
Reference in a new issue