| 27 | } |
| 28 | |
| 29 | detach() { |
| 30 | this._ngZone.runOutsideAngular(() => { |
| 31 | const element = this.element; |
| 32 | clearTimeout(this._fallbackTimeout); |
| 33 | this._cleanupTransitionEnd?.(); |
| 34 | this._cleanupTransitionEnd = this._renderer.listen(element, 'transitionend', this.dispose); |
| 35 | this._fallbackTimeout = setTimeout(this.dispose, 500); |
| 36 | |
| 37 | // If the backdrop doesn't have a transition, the `transitionend` event won't fire. |
| 38 | // In this case we make it unclickable and we try to remove it after a delay. |
| 39 | element.style.pointerEvents = 'none'; |
| 40 | element.classList.remove('cdk-overlay-backdrop-showing'); |
| 41 | }); |
| 42 | } |
| 43 | |
| 44 | dispose = () => { |
| 45 | clearTimeout(this._fallbackTimeout); |