(relatedTarget)
| 2469 | return this._isShown ? this.hide() : this.show(relatedTarget); |
| 2470 | } |
| 2471 | show(relatedTarget) { |
| 2472 | if (this._isShown || this._isTransitioning) { |
| 2473 | return; |
| 2474 | } |
| 2475 | const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, { |
| 2476 | relatedTarget |
| 2477 | }); |
| 2478 | if (showEvent.defaultPrevented) { |
| 2479 | return; |
| 2480 | } |
| 2481 | this._isShown = true; |
| 2482 | this._isTransitioning = true; |
| 2483 | this._scrollBar.hide(); |
| 2484 | document.body.classList.add(CLASS_NAME_OPEN); |
| 2485 | this._adjustDialog(); |
| 2486 | this._backdrop.show(() => this._showElement(relatedTarget)); |
| 2487 | } |
| 2488 | hide() { |
| 2489 | if (!this._isShown || this._isTransitioning) { |
| 2490 | return; |
no test coverage detected