Hi there
I have a textItem which seems to have a bug using keyPressFilter. This bug occurs in all browser with the latest build (SmartClient_v101p_2016-02-03_Pro).
1. Type "123"
2. Press Enter (submit-function is called)
3. Correct value is printed in the console
4. Remove all charactes in the textItem
5. Press Enter (submit-function is called)
6. Wrong value is printed in the console
If I'm leaving the field (blur) before between step 4 and 5 the field dies respond with the correct value.
Maybe this case should be added to the automated test-cases. It doesn't seem to be a special use case, instead it is a very normal usage of the Form and the TextItem.
Code for reproduction
Regards
I have a textItem which seems to have a bug using keyPressFilter. This bug occurs in all browser with the latest build (SmartClient_v101p_2016-02-03_Pro).
1. Type "123"
2. Press Enter (submit-function is called)
3. Correct value is printed in the console
4. Remove all charactes in the textItem
5. Press Enter (submit-function is called)
6. Wrong value is printed in the console
If I'm leaving the field (blur) before between step 4 and 5 the field dies respond with the correct value.
Maybe this case should be added to the automated test-cases. It doesn't seem to be a special use case, instead it is a very normal usage of the Form and the TextItem.
Code for reproduction
Code:
isc.VLayout.create({ "ID" : "theRootLayout", "hideUsingDisplayNone" : false, "leaveScrollbarGap" : false, "members" : [ isc.DynamicForm.create({ "ID" : "travelSearchForm_11", "submit" : function () { console.log("enter pressed"); console.log(theField.getValue()); }, "width" : "100%", "autoDraw" : false, "padding" : 4, "hideUsingDisplayNone" : false, "numCols" : 5, "autoFocus" : true, "selectOnFocus" : true, "itemHoverDelay" : 1200, "saveOnEnter" : true, "readOnlyDisplay" : "static", "fields" : [{ "ID" : "theField", "name" : "theField", "title" : "Nr.", "type" : "text", "iconWidth" : 16, "iconHeight" : 16, "readOnlyDisplay" : "static", "keyPressFilter" : "[0-9-]" } ], "values" : { "theField" : [] } }) ] })
Comment