Niels Steenbeek
Niels Steenbeek

Reputation: 4834

qooxdoo: SetValue always fires changeValue first time

In qooxdoo a setValue will always fire a 'changeValue' event even when passing '' or null. Is this a bug or do I have to add a model to the controller first before adding listeners?

var field = new qx.ui.mobile.form.PasswordField();
field.addListener('changeValue', function () {
    alert('changed');
});
field.setValue(''); //results in onchange
field.setValue(null); //results in onchange

Upvotes: 1

Views: 168

Answers (1)

Martin Wittemann
Martin Wittemann

Reputation: 2114

Thanks for bringing that up. This seems like a bug to me. You can also do the following thing:

field.setValue(field.getValue());

which should never lead to a change event. Could you open up a bug report here: http://bugzilla.qooxdoo.org/

Upvotes: 1

Related Questions