-
Notifications
You must be signed in to change notification settings - Fork 27.4k
jqLite dumps <tr-xxx> while running jqLiteBuildFragment #10617
Comments
It looks like a pretty valid bug to me (easily fixed by changing the RegExp to |
@gkalpak it was an oversight. If someone creates a PR, it should get merge fast |
#10618 fixes it for jqLite, but jQuery still fails. |
Upon further investigation, it seems like the RegExp and the implementation were based on jQuery (see here and there). |
#10618 will fix the issue when jqLite is used, but will not make any difference when jQuery is used instead (it keeps the current "buggy" behaviour). So, it won't hurt landing #10618 (althought there will be one test failing on jQuery), but it won't thoroughly solve the problem either. Right now, jQuery does not properly handle constructing nodes from HTML text that has a root element with dash-delimited node name whose first subpart is a wrappable element.
The way I see it, this is a bug with jQuery and should be fixed. I am not a jQuery guru, but from what I can tell the fix is the same as with jqLite (just adding So, if jQuery fixed this bug, then #10618 would be sufficient for solving the issue for Angular (with or without jQuery). Not sure what is the indicated course of action. A few I can think of:
|
I would start with opening an issue with jQuery (to include a PR would be ideal) and see how things move from that side... and until there is a definition from jQeury, I would leave #10618 on hold |
Will do over the weekend. |
@LeonardoBraga beat me to it 😄 |
We have a fix ready to be merged at #12759 |
$compile
service will call jqLite to convert html to JQuery element. It's found that injqLiteBuildFragment
function, if a customized directive tag like<tr-xxx>
will be wrapped to<table>...
due to this regexpvar TAG_NAME_REGEXP = /<([\w:]+)/;
does not capture 'dash-delimited' tag name. And the fragmenttr
is inwrapMap
which will be wrapped to a comprehensivetable
html later.As a result, the directive cannot be compiled successfully.
I wonder any reason behind this or it's a bug to be fixed, should I PR for this?
https://github.com/angular/angular.js/blob/master/src/jqLite.js#L145
The text was updated successfully, but these errors were encountered: