Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This solution is still in exploration, and consists in two steps:
1- having the input element always reachable, but with invisible characters, cursor, etc.
2- having a ghost character that will allow ios to show the "paste" button when long pressing the input element before inputing any value
About the ghost character
Just by having the first item of this PR will allow the input to be copy/pastable in mobile devices, however, a long press action on the input will only show the "paste" option if:
1- the input is already focused.
2- the input already has some content in it.
since we can't guarantee that the input will always be focused before the user interacts with it, IF we want to not have the necessity of having the input focused before showing the "paste" option, a existence of a ghost character can solve this problem.
I would personally like to not have to fallback in this kind of solution since it will add more complexity when handling the input selection range, the value attached to input, the input on change event, and copying (as we can see on the files changed at time of write)
anyways, here's a solution that seems to bring a nice UX to the end user: