Hi,
I found another bug concerning the hint shown in a TextItem.
If you show a TextItem, which was hidden before, and in the same step set a value in it, the value is treated like a hint. This means, if you click into the TextItem the value vanishes and the TextItem is emtpy. If you leave the TextItem the default hint is set.
If you set the value twice (after the TextItem is already shown), the set value is treated as the real value of the TextItem and not as a hint.
In addition: In the first part, if the textItem is getting cleared, and the focus is in the textitem getValue() still returns the correct value. If you focus another textItem, and the hint is shown, the getValue() returns a empty string.
Here's a agif for further explanation
Here is the code for this example:
This is reproducable with the latest nightly from SmartClient_v10.0p_2015-05-07_Pro and it is the same in latest version of firefox, chrome and IE.
Best regards
I found another bug concerning the hint shown in a TextItem.
If you show a TextItem, which was hidden before, and in the same step set a value in it, the value is treated like a hint. This means, if you click into the TextItem the value vanishes and the TextItem is emtpy. If you leave the TextItem the default hint is set.
If you set the value twice (after the TextItem is already shown), the set value is treated as the real value of the TextItem and not as a hint.
In addition: In the first part, if the textItem is getting cleared, and the focus is in the textitem getValue() still returns the correct value. If you focus another textItem, and the hint is shown, the getValue() returns a empty string.
Here's a agif for further explanation
Here is the code for this example:
Code:
isc.VLayout.create({ "width" : "100%", "members" : [ isc.ToolStrip.create({ "width" : "100%", "members" : [isc.Button.create({ "width" : 200, "click" : function () { theTextItem.setValue(""); theTextItem2.hide(); theTextItem2.setValue(""); }, "title" : "Hide TextItem 2", }), isc.Button.create({ "width" : 200, "click" : function () { theTextItem.setValue(""); theTextItem2.setValue("2345"); theTextItem2.show(); }, "title" : "Show TextItem 2 and set value", }) ] }), isc.DynamicForm.create({ "ID":"theForm", "width" : "100%", "readOnlyDisplay" : "static", "fields": [ { "ID" : "theTextItem", "title" : "Information 1", "type" : "text", "hint" : "this is the hint", "showHintInField" : true }, { "ID" : "theTextItem2", "title" : "Information 2", "type" : "text", "hint" : "this is the hint", "showHintInField" : true } ], "values" : { "theTextItem" : "", "theTextItem2" : "", } }) ] })
Best regards
Comment