File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 99// tslint:disable:no-duplicate-imports
1010import { EventContract } from '@angular/core/primitives/event-dispatch' ;
1111import { Attribute } from '@angular/core/primitives/event-dispatch' ;
12- import { InjectionToken , Injector } from './di' ;
12+ import { InjectionToken } from './di' ;
1313import { RElement } from './render3/interfaces/renderer_dom' ;
1414
1515export const DEFER_BLOCK_SSR_ID_ATTRIBUTE = 'ngb' ;
@@ -20,16 +20,6 @@ declare global {
2020 }
2121}
2222
23- export function invokeRegisteredDelegationListeners ( event : Event ) {
24- const handlerFns = ( event . currentTarget as Element ) ?. __jsaction_fns ?. get ( event . type ) ;
25- if ( ! handlerFns ) {
26- return ;
27- }
28- for ( const handler of handlerFns ) {
29- handler ( event ) ;
30- }
31- }
32-
3323export function setJSActionAttributes (
3424 nativeElement : Element ,
3525 eventTypes : string [ ] ,
@@ -112,7 +102,7 @@ export const JSACTION_EVENT_CONTRACT = new InjectionToken<EventContractDetails>(
112102
113103export function invokeListeners ( event : Event , currentTarget : Element | null ) {
114104 const handlerFns = currentTarget ?. __jsaction_fns ?. get ( event . type ) ;
115- if ( ! handlerFns ) {
105+ if ( ! handlerFns || ! currentTarget ?. isConnected ) {
116106 return ;
117107 }
118108 for ( const handler of handlerFns ) {
You can’t perform that action at this time.
0 commit comments