Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: EE-3.3.0.GA_P05
-
Fix Version/s: EE-3.3.0.GA_P06
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Any
-
Support Case References:Support Case 14362:- https://icesoft.my.salesforce.com/5000g00001vT6vR
Description
The mere presence of a <fieldset> element (empty) causes a javascript error when using ice:commandLink with an action attribute. The error shown in the developer tools window is "Unable to get property 'indexOf' of undefined or null reference". This only occurs on IE11. It works fine on Chrome, Edge, and FF.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Marking this issue as Won't Fix, as there's no need to fix anything in ICEfaces. The javascript error occurs in the JSF code, and there's a way to avoid it.
The error occurs in the request() method in jsf.js, when the code goes through all the form elements, checking their 'name' attributes. The 'fieldset' element didn't get a 'name' attribute until HTML5, which doesn't seem to be well supported by IE11. So, IE11 throws an error because it cannot find a 'name' property on this empty 'fieldset' element that was added to the page.
The workaround is to give a 'name' property to the 'fieldset' element, in order to avoid this error on IE11. However, simply adding a 'name' attribute in the markup doesn't work, because 'name' doesn't seem to be a recognized attribute for 'fieldset' on IE11. So, the solution is to give this element a 'name' property via Javascript. The following code accomplishes this.
The value of the 'name' property can be the empty string. As long as there's a 'name' property on this object, the error won't occur.