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
When handing Bootstrap's modal JS a template with Xray's HTML comments, it causes weird bugs like multiple backdrops.
The Bootstrap issue doesn't really have anything to do with the HTML comments per se; more that the JS doesn't expect to be given a jQuery object with anything other than a single root node. However I'm feeling that injecting extra DOM nodes in general could be prone to problems like this.
One idea would be to add data-xray attributes to DOM nodes instead. For example:
In this example, data-xray-id is used to link the two outer sibling roots of the template together.
The main drawback of this proposal is that wrapping a template with HTML comments is simple; manipulating HTML attributes is not (imagine if the template starts with a weird node like a comment, or a doctype, or a script tag, etc). Really don't want to drag an XML parser into xray's dependencies.
The text was updated successfully, but these errors were encountered:
@brentd Hi I'd like to try adding Angular templates support . In what way did you picture it being implemented for this project? Just to be sure - why don't Angular templates work , are they not being processed in the middleware or is it a problem in the client side?
I've noticed the HTML comments that Xray injects cause a couple issues.
The Bootstrap issue doesn't really have anything to do with the HTML comments per se; more that the JS doesn't expect to be given a jQuery object with anything other than a single root node. However I'm feeling that injecting extra DOM nodes in general could be prone to problems like this.
One idea would be to add
data-xray
attributes to DOM nodes instead. For example:In a partial with one root node:
In a partial with multiple root nodes:
In this example,
data-xray-id
is used to link the two outer sibling roots of the template together.The main drawback of this proposal is that wrapping a template with HTML comments is simple; manipulating HTML attributes is not (imagine if the template starts with a weird node like a comment, or a doctype, or a script tag, etc). Really don't want to drag an XML parser into xray's dependencies.
The text was updated successfully, but these errors were encountered: