To reproduce, publish this form, open the /new page, select "1" from the dropdown, check the box labeled "Field 1", and the error will appear.
This regression was introduced while fixing #6336. We switched from YUI to the DOM methods .classList.remove() and .classList.add(), but encountered an issue where an empty string was being added as a class, which the DOM API rejects. This is not unreasonable. The empty string arises because in JavaScript, "".split(" ") returns an array with an empty string instead of an empty array. We don't have this problem in our latest code, where we use our own splitTo method from StringUtils.scala, where "".splitTo[List]("") returns an empty list.
To reproduce, publish this form, open the
/new
page, select "1" from the dropdown, check the box labeled "Field 1", and the error will appear.This regression was introduced while fixing #6336. We switched from YUI to the DOM methods
.classList.remove()
and.classList.add()
, but encountered an issue where an empty string was being added as a class, which the DOM API rejects. This is not unreasonable. The empty string arises because in JavaScript,"".split(" ")
returns an array with an empty string instead of an empty array. We don't have this problem in our latest code, where we use our ownsplitTo
method fromStringUtils.scala
, where"".splitTo[List]("")
returns an empty list.+1 from customer