ionic-team / ionic-team/ionic-framework

bug: Popover incorrectly rendered when css zoom is set on html element

已关闭
#30,919 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
package: core type: bug
主要语言
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 CSS zoom is set on html element to value other than 1, popover gets drawn incorrectly.
It is positioned in the incorrect place. Setting size attribute to cover makes size of popover to be also incorrect.

Image

### Expected Behavior

Popover should be sized and positioned correctly regardless of zoom.

### Steps to Reproduce

1. Set CSS zoom on html element to anything other than 1 (ex. 1.5)
2. Open popover by clicking on a button

### Code Reproduction URL

https://stackblitz.com/edit/lelnqysr?file=src%2Fglobal.css

### Ionic Info

Ionic:

Ionic CLI : 7.2.1 (C:\Users\USER\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 8.7.16
@angular-devkit/build-angular : not installed
@angular-devkit/schematics : 20.1.0
@angular/cli : 20.1.0
@ionic/angular-toolkit : 11.0.1

Utility:

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

System:

NodeJS : v22.20.0 (C:\Program Files\nodejs\node.exe)
npm : 11.6.2
OS : Windows 10

### Additional Information

Changing the zoom level of the html element is mentioned in Ionic documentation.
https://ionicframework.com/docs/layout/dynamic-font-scaling#chrome-for-android

贡献指南

打开贡献指南

调研方向

Start with the linked StackBlitz reproduction and its src/global.css, setting CSS zoom on html before opening the popover. Trace the popover's sizing and positioning behavior under zoom; done means it remains correctly sized and positioned, including when size is set to cover.

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

评估

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

把新 issue 发到你的邮箱

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