@@ -37,8 +37,8 @@ export class FocusTrap {
37
37
private _hasAttached = false ;
38
38
39
39
// Event listeners for the anchors. Need to be regular functions so that we can unbind them later.
40
- private _startAnchorListener = ( ) => this . focusLastTabbableElement ( ) ;
41
- private _endAnchorListener = ( ) => this . focusFirstTabbableElement ( ) ;
40
+ protected startAnchorListener = ( ) => this . focusLastTabbableElement ( ) ;
41
+ protected endAnchorListener = ( ) => this . focusFirstTabbableElement ( ) ;
42
42
43
43
/** Whether the focus trap is active. */
44
44
get enabled ( ) : boolean { return this . _enabled ; }
@@ -70,15 +70,15 @@ export class FocusTrap {
70
70
const endAnchor = this . _endAnchor ;
71
71
72
72
if ( startAnchor ) {
73
- startAnchor . removeEventListener ( 'focus' , this . _startAnchorListener ) ;
73
+ startAnchor . removeEventListener ( 'focus' , this . startAnchorListener ) ;
74
74
75
75
if ( startAnchor . parentNode ) {
76
76
startAnchor . parentNode . removeChild ( startAnchor ) ;
77
77
}
78
78
}
79
79
80
80
if ( endAnchor ) {
81
- endAnchor . removeEventListener ( 'focus' , this . _endAnchorListener ) ;
81
+ endAnchor . removeEventListener ( 'focus' , this . endAnchorListener ) ;
82
82
83
83
if ( endAnchor . parentNode ) {
84
84
endAnchor . parentNode . removeChild ( endAnchor ) ;
@@ -103,12 +103,12 @@ export class FocusTrap {
103
103
this . _ngZone . runOutsideAngular ( ( ) => {
104
104
if ( ! this . _startAnchor ) {
105
105
this . _startAnchor = this . _createAnchor ( ) ;
106
- this . _startAnchor ! . addEventListener ( 'focus' , this . _startAnchorListener ) ;
106
+ this . _startAnchor ! . addEventListener ( 'focus' , this . startAnchorListener ) ;
107
107
}
108
108
109
109
if ( ! this . _endAnchor ) {
110
110
this . _endAnchor = this . _createAnchor ( ) ;
111
- this . _endAnchor ! . addEventListener ( 'focus' , this . _endAnchorListener ) ;
111
+ this . _endAnchor ! . addEventListener ( 'focus' , this . endAnchorListener ) ;
112
112
}
113
113
} ) ;
114
114
0 commit comments