cloneLinkingFn sometimes gets an empty clone with multiple slots #16607
Description
I'm submitting a ...
- bug report
- feature request
- other
Current behavior:
Since AngularJS 1.7.1 we sometimes see the following behavior in Firefox (Windows, Mac, Release and Nightly), but not in Chrome.
HTML:
<some-component>
<slota>
.. Tags and text
</slota>
<slotb>
.. Tags and text
</slotb>
</some-component>
Component someComponent:
transclude: {
'slota': 'slota',
'slotb': '?slotb'
},
and in the template:
<li ng-repeat="item in items"
ng-click... ng-class
ng-transclude="slota">
The content of li is sometimes just empty. Approx. one out of 20 tries. When I do the transclusion this way:
$transclude(scope, function(clone) {
element.append(clone);
}, null, 'slota');
clone is sometimes empty, i.e. length===0, which normally means that I did a <slota></slota>
.
I tried the AngularJS versions 1.7.2, 1.7.1, 1.7.0 and 1.6.10 and it doesn't work with 1.7.2 and 1.7.1. Every other version is just fine.
I checked the changes between 1.7.0 and 1.7.1 and tried to revert them in the 1.7..1 code. When I revert the change from this commitm, everything works as before.
So far, I was unable to reproduce this in a Plunkr.
AngularJS version: 1.7.1+
Browser: [ Firefox both Release and Nightly on Windows and macOS]