Version: v8.3p_2013-04-10/PowerEdition Development
OS:XP, Vista, Win7
Browser:IE8-10
In short calling hideIcon on a TextItem fails in IE with an "Unknown runtime error".
Background: I am implementing a 'clear filter' icon that clears the input of a given field on the filter editor of a listgrid. It applies only to text fields and should appear when the item gets focus and disappear when the item loses focus.
To re-create:
http://www.smartclient.com/#filter
In Chrome this works as expected, but in IE it yields the unknown runtime error.
I tracked down the cause to the hideIcon function on FormItem:
It seems the code might be suffering from a variation of the problem outlined here:
http://www.theogray.com/blog/2009/06/internet-explorer-unknown-runtime-error
You can re-create the problem more simply by loading the example:
http://www.smartclient.com/#formIcons
Giving the form an ID:
and pressing 'Try it'
Then on the console call:
This will fail in IE, but work in Chrome.
Many thanks for looking at this.
OS:XP, Vista, Win7
Browser:IE8-10
In short calling hideIcon on a TextItem fails in IE with an "Unknown runtime error".
Background: I am implementing a 'clear filter' icon that clears the input of a given field on the filter editor of a listgrid. It applies only to text fields and should appear when the item gets focus and disappear when the item loses focus.
To re-create:
http://www.smartclient.com/#filter
Code:
isc.ListGrid.create({ ID: "countryList", width:500, height:300, alternateRecordStyles:true, dataSource: worldDS, fields:[ {name:"countryCode", title:"Code", width:50}, {name:"countryName", title:"Country"}, {name:"capital", title:"Capital"}, {name:"continent", title:"Continent"} ], autoFetchData: true, showFilterEditor: true, getFieldFilterEditorProperties:function(field) { if (this.getFilterEditorType(field) != "text") { return } return { icons:[ { src:"/isomorphic/skins/Simplicity/images/headerIcons/close.gif", showIf:"false", width:15, height:15, click:function(form, item) { item.clearValue(); item.changed(); // end click } } ], focus:function(form,item) { item.showIcon(0); // end focus }, blur:function(form,item) { item.hideAllIcons(); // end blur } } // end getFieldFilterEditorProperties } })
I tracked down the cause to the hideIcon function on FormItem:
Code:
if (row.cells.length == 1) { isc.Element.clear(element.parentNode);
http://www.theogray.com/blog/2009/06/internet-explorer-unknown-runtime-error
You can re-create the problem more simply by loading the example:
http://www.smartclient.com/#formIcons
Giving the form an ID:
Code:
isc.DynamicForm.create({ ID:"test", width: 200, ...
Then on the console call:
Code:
test.getItem(0).hideAllIcons()
Many thanks for looking at this.
Comment