ionic-team / ionic-team/ionic-docs

Document that hardware back button event for overlays does not fire if overlay has backdropDismiss set to false

オープン
#1,498 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
content
主要言語
MDX
スター
621
フォーク
3.2k
平均マージ
1日 2時間
マージ済み PR(30日)
86

説明

**URL**
https://ionicframework.com/docs/developing/hardware-back-button

**What is missing or inaccurate about the content on this page?**
Just spent a few hours debugging why my registration for hardware back button, which shows an alert dialog, keeps firing even when the alert dialog was displayed, essentially showing an alert on top of an alert, although I registered it with priority 1 (which is well bellow the 100 assigned to overlays).

Turns out the overlay is registering for back button handling only if backdropDismiss is set to true, and this is NOT mentioned in the docs at all.
See [here](https://github.com/ionic-team/ionic/blob/1decc13cb8d355a6fa32d303271a34550082cada/core/src/utils/overlays.ts#L66) for the actual logic.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。