()
| 391 | } |
| 392 | |
| 393 | componentDidLoad() { |
| 394 | /** |
| 395 | * Only create gesture if: |
| 396 | * 1. A gesture does not already exist |
| 397 | * 2. App is running in iOS mode |
| 398 | * 3. A wrapper ref exists |
| 399 | */ |
| 400 | if (!this.gesture && getIonMode(this) === 'ios' && this.wrapperEl) { |
| 401 | this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl: HTMLElement) => |
| 402 | refEl.classList.contains('alert-button') |
| 403 | ); |
| 404 | this.gesture.enable(true); |
| 405 | } |
| 406 | |
| 407 | this.setupButtonGroupResizeObserver(); |
| 408 | |
| 409 | /** |
| 410 | * If alert was rendered with isOpen="true" |
| 411 | * then we should open alert immediately. |
| 412 | */ |
| 413 | if (this.isOpen === true) { |
| 414 | raf(() => this.present()); |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * When binding values in frameworks such as Angular |
| 419 | * it is possible for the value to be set after the Web Component |
| 420 | * initializes but before the value watcher is set up in Stencil. |
| 421 | * As a result, the watcher callback may not be fired. |
| 422 | * We work around this by manually calling the watcher |
| 423 | * callback when the component has loaded and the watcher |
| 424 | * is configured. |
| 425 | */ |
| 426 | this.triggerChanged(); |
| 427 | } |
| 428 | |
| 429 | /** |
| 430 | * Present the alert overlay after it has been created. |
nothing calls this directly
no test coverage detected