You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$1000] iOS Safari - Additional cursor visible in wrong position when entering magic code in any page #20644
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Notice that the blue vertical cursor stays in the first digit slot and moves slightly towards the right as we enter more digits.
Expected Result:
The blue vertical cursor should not be visible at all since it is not visible in any apps/phone browsers/desktop app/desktop browsers.
Actual Result:
The blue cursor is visible in iOS safari. Moreover, its position was wrong.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.26-2 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
What changes do you think we should make in order to solve the problem?
Solution 1 (take a step back approach):
High level idea:
Set the caret-color CSS at web/index.html to avoid platform dependent styling within styles.js (Note: there is already existing caret-color stylings in index.html)
Detailed Changes:
STEP1. Revert #18771 changes in MagicCodeInput.js , but keep those in styles.js
<Viewstyle={[StyleSheet.absoluteFillObject,styles.w100,styles.bgTransparent]}// Used as CSS selector to customize caret-color styledataSet={{'magic-code-input': true}}>
as caretHidden is not a valid props for react-native-web, right now it is just setting false value for native apps, which is same as the default value.
Would like to mention that this bug is only reproducible using an ACTUAL IPhone device, it is not reproducible using Mac IOS simulator.
Reason being Mac IOS simulator merely mimics the actual device, not emulating it (unlike Android Emulator), so it is expected to have some minor differences in behaviour between IOS simulator and IOS device.
Please re-state the problem that we are trying to solve in this issue.
Additional cursor visible in wrong position when entering magic code in any page in mobile safari
What is the root cause of that problem?
This is regression of #18771.
for hiding caret and input we use opacity0 though we couldn't paste in mobile safari with opacity0.
for this it was changed to use styles.bgTransparent for mobile safari here.
Thanks a lot for the input, I am not suggesting removal though, my proposal is about adding additional styling.
Have verified that paste feature in Safari still works.
Thanks a lot for the input, I am not suggesting removal though, my proposal is about adding additional styling. Have verified that paste feature in Safari still works.
Using caretColor will raise warnings that the style property is not supported. I think the key to fixing this issue would be to figure out why the caretHidden prop works in Safari on iOS 16.2 but is broken in 16.4. What changed between these versions?
Using caretColor will raise warnings that the style property is not supported. I think the key to fixing this issue would be to figure out why the caretHidden prop works in Safari on iOS 16.2 but is broken in 16.4. What changed between these versions?
Its not related to Ios. caretHidden property is also not working in chrome.
You can test it by: making caretHidden= true and change View style from styles.opactiy0 to styles.bgTransparent
changed the title [-] iOS Safari - Additional cursor visible in wrong position when entering magic code in any page[/-][+][$1000] iOS Safari - Additional cursor visible in wrong position when entering magic code in any page[/+]on Jun 16, 2023
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
melvin-bot commentedon Jun 13, 2023
Triggered auto assignment to @strepanier03 (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 13, 2023
hnkuanx commentedon Jun 13, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When user is entering magic code using IOS Safari Mobile browser, the text input cursor blinking caret are visible and shown in wrong position.
What is the root cause of that problem?
Currently, we have set
caretHidden={isMobileSafari}atApp/src/components/MagicCodeInput.js
Line 339 in 93957f0
However,
caretHiddenis actually supported only by react-native and Not a valid react-native-web TextInput propsFor react-native-web, the right way to make the caret invisible is via the
caretColorstyle.See
TextInputStyledefinition fromreact-native-webcode repohttps://github.com/necolas/react-native-web/blob/2a901e5fb11ac314c753867fbc5b87060ed05f53/packages/react-native-web/src/exports/TextInput/types.js#L14-L18
What changes do you think we should make in order to solve the problem?
Solution 1 (take a step back approach):
High level idea:
Set the caret-color CSS at web/index.html to avoid platform dependent styling within
styles.js(Note: there is already existing caret-color stylings in index.html)Detailed Changes:
STEP1. Revert #18771 changes in
MagicCodeInput.js, but keep those instyles.jsSTEP2. Change
App/src/components/MagicCodeInput.js
Line 314 in e6c2704
STEP3. Change
App/src/components/MagicCodeInput.js
Lines 339 to 340 in e6c2704
STEP4. Add
after
App/web/index.html
Lines 74 to 88 in e6c2704
Solution 2 (previous idea):
We can make the caret invisible by adding
caretColor: 'transparent',tostyles.magicCodeInputTransparenthere:App/src/styles/styles.js
Lines 2479 to 2481 in 93957f0
In addition to that, we should unset
caretHiddenApp/src/components/MagicCodeInput.js
Line 339 in 93957f0
as caretHidden is not a valid props for react-native-web, right now it is just setting false value for native apps, which is same as the default value.
hnkuanx commentedon Jun 13, 2023
Would like to mention that this bug is only reproducible using an ACTUAL IPhone device, it is not reproducible using Mac IOS simulator.
Reason being Mac IOS simulator merely mimics the actual device, not emulating it (unlike Android Emulator), so it is expected to have some minor differences in behaviour between IOS simulator and IOS device.
See these links for lengthier explanation:
https://stackoverflow.com/a/4544605
https://stackoverflow.com/a/37665200
kushu7 commentedon Jun 13, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Additional cursor visible in wrong position when entering magic code in any page in mobile safari
What is the root cause of that problem?
This is regression of #18771.
for hiding caret and input we use
opacity0though we couldn't paste in mobile safari with opacity0.for this it was changed to use
styles.bgTransparentfor mobile safari here.App/src/components/MagicCodeInput.js
Line 314 in 93957f0
but
caretColorwas not changed to 'transparent'. so we can see caret there on Safari.so this is root cause of it.
What changes do you think we should make in order to solve the problem?
To solve this problem we can add
caretColor: 'transparent'tostyles.magicCodeInputTransparent.App/src/components/MagicCodeInput.js
Line 340 in 93957f0
What alternative solutions did you explore? (Optional)
None
hungvu193 commentedon Jun 13, 2023
You need to make sure the paste feature in Safari still worked if you removed that. Because it was intentionally added in this PR by @akinwale
hnkuanx commentedon Jun 13, 2023
Thanks a lot for the input, I am not suggesting removal though, my proposal is about adding additional styling.
Have verified that paste feature in Safari still works.
akinwale commentedon Jun 13, 2023
Using
caretColorwill raise warnings that the style property is not supported. I think the key to fixing this issue would be to figure out why thecaretHiddenprop works in Safari on iOS 16.2 but is broken in 16.4. What changed between these versions?kushu7 commentedon Jun 13, 2023
Its not related to Ios.
caretHiddenproperty is also not working in chrome.You can test it by: making
caretHidden= trueand change View style fromstyles.opactiy0tostyles.bgTransparentmaybe its related to ReactNative
hnkuanx commentedon Jun 13, 2023
It is actually related to react-native-web.
Updated my proposal with explanation.
Have tested my solution does not raise any warning as well
strepanier03 commentedon Jun 13, 2023
As explained above I can't recreate without a real iOS device, I tried in Browserstack without any luck.
I've asked for someone with an actual device to test here.
8 remaining items
conorpendergrast commentedon Jun 16, 2023
I do have a physical iOS device, and I absolutely will test this!
conorpendergrast commentedon Jun 16, 2023
I was indeed able to reproduce this on my phone 👍
[-] iOS Safari - Additional cursor visible in wrong position when entering magic code in any page[/-][+][$1000] iOS Safari - Additional cursor visible in wrong position when entering magic code in any page[/+]melvin-bot commentedon Jun 16, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0149549af47f58f7a5
melvin-bot commentedon Jun 16, 2023
Current assignee @conorpendergrast is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jun 16, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (
External)s77rt commentedon Jun 16, 2023
This can be closed (a dupe). We are investigating this in #19220.
conorpendergrast commentedon Jun 19, 2023
Agreed, that looks like an identical bug to #19220, which was reported a month earlier. Thanks @s77rt, I missed that in my dupe issue check!
rohit9625 commentedon Aug 23, 2025
Hi, I was seeing this issue reproducible on one of my physical Android devices. Should I create a new issue or just drop the repro video here?