vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

bug: dark theme text input turns white on hover and select

Open britneywwc opened this issue 2 years ago • 3 comments

Describe the bug

When hovering over an autofill option in the text field, the original text field turns white. After selecting an autofill option, the search bar reverts to light theme.

To Reproduce

Steps to reproduce the behavior:

  1. Go to dark form example
  2. Enter a test email in the email address section and hit enter to submit
  3. Click on the email address section, hover over the previously submitted text and see error.
  4. Select the autofill suggestion and see error.

Expected behavior

The input text field should remain the original theme colours and font.

Screenshots

Screenshot 2023-12-04 at 11 26 51 AM Screenshot 2023-12-04 at 1 26 29 PM

Desktop (please complete the following information):

OS: macOS Browser: Chrome Version: 119.0.6045.199

britneywwc avatar Dec 04 '23 03:12 britneywwc

I think this problem is because of -internal-autofill-selected field It's overriden by the browser default value. Screenshot 2024-01-01 at 12 55 08 AM Screenshot 2024-01-01 at 12 56 54 AM

The hacky solution I found for this was adding the following

input:-webkit-autofill,
input:-webkit-autofill:focus {
    transition: background-color 0s 600000s, color 0s 600000s;
  }
Screenshot 2024-01-01 at 12 58 04 AM

Still trying to figure how to fix it from the sass file.

elsayedz avatar Dec 31 '23 23:12 elsayedz

Triage: seems still to happen. Looks like browser (chrome) overrides input colour if the value is auto-filled.

We should have a look if that's something we could address.

bartaz avatar Sep 24 '24 09:09 bartaz

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15249.

This message was autogenerated