Alexander K
Alexander K

Reputation: 21

Try to use "Enter" key to submit form

I ask your help Everybody. :-)

Here is a link to Playground.

The problem you can see if to look at the console or debug log.

If you fill the text fields and press "Enter" key, you can see that only the first field can get the value. Second one is NULL. If you tap "Enter" key second time - there is no problem at all. But if you clean fields and fill it up again - the same problem will be back.

If I use just a button with "execute" event - there is no problem.

Is it a bug or something wrong about my code?

Upvotes: 1

Views: 129

Answers (1)

aE3e
aE3e

Reputation: 227

I think the problem is that the changed value of the textfield is applied to the model only when the textfield looses focus (or after you pressed Enter). So yo have to set the liveUpdate property to true. Here is your playground example updated.

var userPhone = new qx.ui.form.TextField().set({
  required: true,
  placeholder: "00123456789",
  liveUpdate : true
});

Upvotes: 3

Related Questions