ionic-team / ionic-team/ionic-framework

bug: backdrop not shown when IonDatetime is used in IonModal

未关闭
#29,507 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
needs: investigation
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

When IonDatetime is used within an IonModal, the backdrop that is supposed to accompany the date/time selector doesn't appear.

### Expected Behavior

When IonDatetime is used within an IonModal, the backdrop as appears here in the docs appears correctly.

### Steps to Reproduce

Create basic Ionic app
Create an IonModal
Inside that IonModal, place an IonDatetimeButton component
Within the element as the base IonModal, place the Basic Usage code provided here: https://ionicframework.com/docs/api/datetime-button

### Code Reproduction URL

https://stackblitz.com/edit/jcadpz?file=src%2Fmain.tsx

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users//.npm-packages/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.1.2

Capacitor:

Capacitor CLI : 6.0.0
@capacitor/android : not installed
@capacitor/core : 6.0.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.11.0 (/usr/local/bin/node)
npm : 10.2.4
OS : macOS Unknown

### Additional Information

I feel like there needs to be some way for a modal associated with a datetime modal to have a higer z-index so the backdrop appears correctly. I tried supplying my own IonBackdrop but couldn't get that to work. I can manually edit the `:host` pseudo selector in the dev tools and increase the `z-index` to a value that works (11 vs. 2).
Screenshot 2024-05-15 at 16 24 28

贡献指南

打开贡献指南

调研方向

Start with src/main.tsx in the linked StackBlitz reproduction and compare its IonModal, IonDatetimeButton, and IonDatetime setup with the Basic Usage example in the datetime-button documentation. Investigate the overlay and backdrop behavior when the datetime selector is nested in IonModal, then verify that the backdrop appears correctly without manual z-index changes.

由索引模型根据 Issue 内容生成。

评估

技术栈
react, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。