pattern-library
pattern-library copied to clipboard
Controlled Input Text won't render updated value
Controlled Input Text won't render updated value when field already had some focus on it in Safari browser.
Expected Behavior
In Safari browser, when we set value to controlled input text, value should be visible in the field.
Current Behavior
When we set value to controlled input text, new value is not visible in the field in Safari browser.
Steps to Reproduce
https://patterns.axa.ch/?path=/story/examples-input-text-react--controlled-uncontrolled
-
Open link above
-
Click to first field = add focus (in images Safari on the left, Chrome on the right side)
-
Click to second field.
-
Change value in the first or second field (In screenshot I changed in the second field). In chrome - value is changed in both fields. In safari - value is changed only in second field.
Note: It works when you won't add focus to the second field. Just click only to first field (with label Controlled *
) and change value. It works in both browsers.
Context (Environment)
example from pod-myaxa:
-
When editing Communication data block, we have option to fill email field by clicking on Link. It will set new value to email field.
-
We click to link:
-
Form is now valid - email field is set but new value is not visible (only in Safari browser).
env
macOS BigSur 11.6.1 The latest version of component (bug is also in your storybook) Safari 15.1 (16612.2.9.1.30, 16612)
Possible Solution
🤔
Thanks for this detailed issue. I'm not sure when we will be able to fix it as we are very low in number of staff at the moment.
New test URL for reproduction: https://patterns.axa.ch/?path=/story/examples-input-text-react--input-text-controlled-uncontrolled
Accepted, since I could reproduce it on MacOS Monterey 12.5.1 Safari Version 15.6.1 (17613.3.9.1.16).
There was a Safari hack that caused this problem. To me it made no sense at all code-wise. Besides, everything runs fine in Safari, maybe there was a problem on a mobile Safari. The comment was about the cursor. As long as it's just an exceptional problem, we can live with it.