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

fix(many): change the CSS media selector for hover effect #26938

Conversation

alexandre-khoury
Copy link

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

On some Android devices, elements get stuck having the hover effect.

Issue URL: #18570

What is the new behavior?

The issue is fixed on at least the Samsung Galaxy S10. I wasn't able to test on other devices.

Does this introduce a breaking change?

  • Yes
  • No

Other information

I based the fix on the suggestions made here #18570 (comment)

@stackblitz
Copy link

stackblitz bot commented Mar 9, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@thetaPC
Copy link
Contributor

thetaPC commented Oct 27, 2023

Thank you for submitting a PR!

It’s been determined that the Ionic components and the browser are working as intended. The issue is coming from certain devices, like Samsung Galaxy, that are not reporting the correct input type. Chromium queries the device/operating system for a list of inputs (mouse, keyboard, touchscreen, etc) and uses those inputs to determine if any inputs support hover states. Since the device is not reporting the correct input type, the sticky hover state is being applied.

The team has decided not to apply a patch internally for this bug since this issue needs to be fixed on the device level. While the proposed PR does resolve the issue for certain devices, it regresses hover behavior on devices that do not report pointer states correctly (see #24179 for more information). There is an open issue on the Chromium bug tracker for this hover issue. I highly recommend that you star this issue to receive updates on the progress and provide any additional information that you may have.

A workaround for this issue is to override the hover state for the desired component. You can do this by using some user agent detection (or device detection) and then applying the hover state to the desired component through a CSS class.

@thetaPC thetaPC closed this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants