Decathlon / vitamin-ios

Decathlon Design System UI components for iOS & iPadOS applications
https://www.decathlon.design
Apache License 2.0
48 stars 14 forks source link

bug: textColor on button changes when title is changed #101

Closed daniel-dumortier closed 1 year ago

daniel-dumortier commented 1 year ago

Describe the bug In some cases, when you change the title of a UIKit VitaminButton, the text color of the title is set back to black.

Steps to reproduce

  1. Create a VitaminButton
  2. when you click on the button, change the title of the button, with the same value or a different
  3. see that the text color is randomly black

Expected behavior

Button'title color should remain the same when title changes

Screenshots

Here is an example with a PageViewController, and a primary VitaminButton (see Screenshots section). Intended behaviour is :

On the video we can see that sometimes (apparently when we set the title with the same value), text color goes back to black

https://user-images.githubusercontent.com/43171132/208073017-7add3f8d-fc4c-4af9-b673-5430714368c9.mp4

Device (please complete the following information):