File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2403,7 +2403,8 @@ class LoadingPlugin {
2403
2403
}
2404
2404
getLoadingDirectives ( element ) {
2405
2405
const loadingDirectives = [ ] ;
2406
- let matchingElements = element . querySelectorAll ( '[data-loading]' ) ;
2406
+ let matchingElements = [ ...element . querySelectorAll ( '[data-loading]' ) ] ;
2407
+ matchingElements = matchingElements . filter ( ( elt ) => elt . closest ( '[data-controller="live"]' ) === element ) ;
2407
2408
if ( element . hasAttribute ( 'data-loading' ) ) {
2408
2409
matchingElements = [ element , ...matchingElements ] ;
2409
2410
}
Original file line number Diff line number Diff line change @@ -150,7 +150,10 @@ export default class implements PluginInterface {
150
150
151
151
getLoadingDirectives ( element : HTMLElement | SVGElement ) {
152
152
const loadingDirectives : ElementLoadingDirectives [ ] = [ ] ;
153
- let matchingElements = element . querySelectorAll ( '[data-loading]' ) ;
153
+ let matchingElements = [ ...element . querySelectorAll ( '[data-loading]' ) ] ;
154
+
155
+ // ignore elements which are inside a nested "live" component
156
+ matchingElements = matchingElements . filter ( ( elt ) => elt . closest ( '[data-controller="live"]' ) === element ) ;
154
157
155
158
// querySelectorAll doesn't include the element itself
156
159
if ( element . hasAttribute ( 'data-loading' ) ) {
You can’t perform that action at this time.
0 commit comments