Description
It took all day to hunt this bug down and would love to find a solution.
It seems this bug is caused by the way this library renders RX.Text
inside a RX.Button
with data-text-as-pseudo-element + ::before combo.
To start, please use an iPad, open Safari, and then open a tab to any website you choose. Next, open a 2nd tab, and load the problematic React XP page) in the tab (code linked at bottom of post).
Now let the fun begin:
- In the text input field on the top, type '123'.
- You should see that there is:
a. '123 People' that is justRX.Text
b. '123' that is just whiteRX.Text
in the orangeRX.Button
c. All works perfect so far. - Now click the other tab you have open, wait a few seconds, and come back to the testing tab.
- Now, add '456' so it should read '123456' for both 2a and 2b.
- It shouldn't have worked for the button, only for the text.
- If it worked and you see '123456', try to add '789' after changing tabs with a few seconds wait.
- The button will basically not render the full reactive text input value, even though if you inspect it, it will show that the entire string is indeed the value for the button's
data-text-as-pseudo-element
attribute.
I noticed that the text in 2a always matches the text input value correctly because it does not use the data-text-as-pseudo-element + ::before combo. I also noticed that once the button is not matching the text input after switching tabs and coming back and adding some more text, that flipping the iPad causes it to "correct" itself and match the text input value. So it seems it needs a reflow/redraw of the button to occur for it to update correctly.
Would love to hear your thoughts on what solution we can implement so that the button matches the text input value without having to flip the iPad.
Updated links to view in chrome:
Here is the full screen link to reproduce
Here is a link with code
NOTE: It loads much faster in chrome, so I recommend checking out the code there.