Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
kinggolf opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@kinggolf
Copy link

Prerequisites

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.

Screen.Recording.2024-09-13.at.9.49.30.AM.mov
Screen.Recording.2024-09-11.at.11.24.12.AM.mov

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

@ionitron-bot ionitron-bot bot added the triage label Sep 13, 2024
@kinggolf
Copy link
Author

A couple notes here:

  1. I was able to resolve this ion-segment-button behavior by issuing a mouseup MouseEvent after the context menu is closed.
  2. The reported behavior appears not to happen on all Macs. I had it tested on 4 Macbook Pros and the behavior appears 3 of them, but not on the 4th.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant