You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code that enhance generated fields sometimes uses global selectors such as $(id), where id is an element generated by the underlying field. This works well provided the form element is in the DOM. However, JSON Form may very well be applied to an element that has not yet been inserted in the DOM (e.g. to prepare a view before rendering).
All selections in JSON Form should rather be scoped to node.el to guarantee that they parse the right subtree, no matter whether it is in the main DOM tree or not.
Similarly, the ACE editor receives "node.id" + "__ace" as initialization parameter. Internally, the ACE library uses getElementById to retrieve the element, which fails when the element is not yet in the DOM tree. The ACE editor should rather receive the element directly.
The text was updated successfully, but these errors were encountered:
Code that enhance generated fields sometimes uses global selectors such as
$(id)
, whereid
is an element generated by the underlying field. This works well provided the form element is in the DOM. However, JSON Form may very well be applied to an element that has not yet been inserted in the DOM (e.g. to prepare a view before rendering).All selections in JSON Form should rather be scoped to
node.el
to guarantee that they parse the right subtree, no matter whether it is in the main DOM tree or not.Similarly, the ACE editor receives
"node.id" + "__ace"
as initialization parameter. Internally, the ACE library usesgetElementById
to retrieve the element, which fails when the element is not yet in the DOM tree. The ACE editor should rather receive the element directly.The text was updated successfully, but these errors were encountered: