Closed fredvd closed 8 years ago
Would you like to prepare a pull request for this?
@fredvd How about trying the old way at first, wrapping it into try {} catch {}
, and on error, do it in the new way. Or the other way aroud?
@mgedmin I'd have no problem to create a PR, but I'm on wintersport vacation this week, typing on mobile now.
@datakurre Doing a try/catch could help for ensuring backwards compat. But I'm a lousy javascript/frontender. Was Already surprises I figured this out myself :-P
What worries me most about the current widget implementation is that if it doesn't initialise properly, like the current issue, the incomplete/empty data is saved back. If we could add a failsafe for that somehow... but maybe it introduces only more complexity that can fail.
Btw. When I searched for similar issues I found this unsolved issue report from jquery .attr() that looks like this case. They also mention other attribute named/values. http://bugs.jquery.com/ticket/12577
The recently pushed out IE11 security update from february 10th 2015 causes a javascript error in the edit template of the OrderedSelectWidget. Users might not notice the error and upon save already selected items in the widget are lost: and empty widget is saved back tot the content item.
Specifically these lines cause the problem in IE11 in orderedselect_input.pt:
It will throw a "member not found" error. See attached screenshot.
Setting other attributes using setAttributeNode are fine, but setting type="hidden" gives problems. My temporary fix in a customer project where I have a controlled environment on the browser versions used (latest IE11, recent Firefox), is using "setAttribute":
But I haven't been able to verify this for other/older browsers and check for compatibility of the .setAttribute method.