material-foundation / material-theme-builder

Visualize dynamic color and create a custom Material Theme.
https://material-foundation.github.io/material-theme-builder/
Apache License 2.0
363 stars 28 forks source link

Cancelling input prompt still changes theme and palette. #60

Closed aisgbnok closed 2 years ago

aisgbnok commented 2 years ago

Describe the bug When entering a custom color, if you dismiss the browser input prompt the color's palette will still change. The error color seems to be very similar to the primary color.

To Reproduce Steps to reproduce the behavior:

  1. Go to Material Theme Builder for Web
  2. Click on "Custom"
  3. Right-click on "Secondary"
  4. Click on "Cancel" for the input prompt
  5. Secondary palette changes
  6. Right-click on "Tertiary"
  7. Click on "Cancel" for the input prompt
  8. Tertiary palette changes
  9. Right-click on "Primary"
  10. Click on "Cancel" for the input prompt
  11. Palette resets

Expected behavior The theme should not change when canceling the input prompt.

Screenshots

https://user-images.githubusercontent.com/10838153/164603500-e42b3cb9-9932-4b9c-9460-5c809a654669.mp4

Desktop:

jwill commented 2 years ago

Fixed.