mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Summary: By default, an alert is `cancelable` on Android but not on iOS. This PR changes the behavior so that the Alert is not dismissable on Android by default. The motivation is that many developers develop on iOS and test on Android, and do forget to consider the case that the alert is dismissable. Consistent behavior by default makes it easier to develop cross-platform apps in general. --- For context and for your consideration, I have started a discussion here with the topic of whether React Native should try to use OS defaults or be consistent between platforms: https://github.com/react-native-community/discussions-and-proposals/issues/121 --- If this PR gets merged, the docs should be updated as well: https://github.com/facebook/react-native-website/blob/master/docs/alert.md#android [Android] [Changed] - By default, alerts are not dismissable Pull Request resolved: https://github.com/facebook/react-native/pull/24541 Differential Revision: D15044798 Pulled By: cpojer fbshipit-source-id: 762b2ace69eb7ec79cd6ebec916e473348b9cafe