ionic-team / ionic-team/ionic-framework

bug: ion-segment-buttons activating improperly after opening contextmenu (right mouse click) on Mac

未关闭
#29,872 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
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

After opening/closing `contextmenu` over an `ion-segment-button` in an Ionic Electron app running on a Mac, other segments appear activated by just hovering over them. These segments are not actually activated since the `ion-segment` value has not changed. This behavior can also be seen on the Ionic docs, https://ionicframework.com/docs/api/segment-button. Our Electron app uses Ionic V6, but same behavior happens on V8.

https://github.com/user-attachments/assets/cd6fcd1c-2b44-4220-b1d9-03eb49712971

https://github.com/user-attachments/assets/4bd0300c-5ca5-422f-99c7-f9ab36c1548f

### Expected Behavior

After opening/closing `contextmenu` the other segments should not appear to be activated when hovering over them.
This behavior does not appear on Windows, only on Mac.

### Steps to Reproduce

1. Go to https://ionicframework.com/docs/api/segment-button
2. On the Basic Usage example right click the checked segment
3. Click off to remove the context menu
4. Hover mouse over other segments to see them appear activated
5. This can only be stopped by left clicking again

### Code Reproduction URL

https://stackblitz.com/edit/ionic6-angular13-agaqtv?file=src%2Fapp%2Fapp.component.html

### Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/larry/.nvm/versions/node/v20.14.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 18.0.7
@angular-devkit/schematics : 18.0.7
@angular/cli : 18.0.7
@ionic/angular-toolkit : 7.0.0

Capacitor:

Capacitor CLI : 6.1.1
@capacitor/android : 6.1.1
@capacitor/core : 6.1.1
@capacitor/ios : 6.1.1

Utility:

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

System:

NodeJS : v20.14.0 (/Users/larry/.nvm/versions/node/v20.14.0/bin/node)
npm : 10.7.0
OS : macOS Unknown

### Additional Information

https://forum.ionicframework.com/t/ion-segment-button-hover-activated-on-right-mouse-click/244097

贡献指南

打开贡献指南

调研方向

Start with the StackBlitz reproduction at src/app/app.component.html and the Basic Usage example on the segment-button documentation page. Reproduce the Mac contextmenu sequence, then trace the ion-segment-button behavior to identify the affected interaction state. Done means hovering after closing the context menu no longer makes other segments appear activated and the selected segment remains unchanged.

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

评估

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

把新 issue 发到你的邮箱

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