Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

cloneLinkingFn sometimes gets an empty clone with multiple slots #16607

Closed
@Sennahoi

Description

@Sennahoi

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]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions