On iOS React text/number input is stuck forcing user to enter in phone numberonChange event for React child component to update stateUser input and command line argumentsTrigger a button click with JavaScript on the Enter key in a text boxHow to disable phone number linking in Mobile Safari?HTML text input allow only numeric inputHow to remove the border highlight on an input text elementDisable Auto Zoom in Input “Text” tag - Safari on iPhoneHow to remove focus border (outline) around text/input boxes? (Chrome)How do I get the value of text input field using JavaScript?Can you force a React component to rerender without calling setState?Input onChange and React logic
Where Does VDD+0.3V Input Limit Come From on IC chips?
Was there a trial by combat between a man and a dog in medieval France?
How to deal with my team leader who keeps calling me about project updates even though I am on leave for personal reasons?
Why is the missed-approach course for the "RNAV (GNSS) - A" approach to runway 28 at ENSB shaped all funny?
Did Apollo carry and use WD40?
How use custom order in folder on Windows 7 and 10
How do I improve in sight reading?
What is the meaning of word 'crack' in chapter 33 of A Game of Thrones?
How does IBM's 53-bit quantum computer compare to classical ones for cryptanalytic tasks?
Norwegian refuses EU delay (4.7 hours) compensation because it turned out there was nothing wrong with the aircraft
How to find the sum of elements at compile time?
How can I repair this gas leak on my new range? Teflon tape isn't working
Hilbert's hotel, why can't I repeat it infinitely many times?
What is the relationship between 友だち, 恋人, and 仲良し in this dialog?
What is the meaning of "heutig" in this sentence?
Will Proving or Disproving of any of the following have effects on Chemistry in general?
Do the villains know Batman has no superpowers?
I reverse the source code, you negate the input!
Can Northern Ireland's border issue be solved by repartition?
Leaving a job that I just took based on false promise of a raise. What do I tell future interviewers?
What's the benefit of keeping a Shadow Pokemon?
If an object moving in a circle experiences centripetal force, then doesn't it also experience centrifugal force, because of Newton's third law?
Escape the labyrinth!
How to manage expenditure when billing cycles and paycheck cycles are not aligned?
On iOS React text/number input is stuck forcing user to enter in phone number
onChange event for React child component to update stateUser input and command line argumentsTrigger a button click with JavaScript on the Enter key in a text boxHow to disable phone number linking in Mobile Safari?HTML text input allow only numeric inputHow to remove the border highlight on an input text elementDisable Auto Zoom in Input “Text” tag - Safari on iPhoneHow to remove focus border (outline) around text/input boxes? (Chrome)How do I get the value of text input field using JavaScript?Can you force a React component to rerender without calling setState?Input onChange and React logic
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
In my React/NextJS app, I have this simple input:
Components:
Search > SearchSelect > ExchangeInfo.tsx:
Search.tsx
<SearchSelect
assets=assets
selected=selected
exchange=exchange
exchanges=exchanges
fetching=fetching
aggregate=aggregate
checkAggregate=this.handleCheckAggregate
enterPosition=this.handleEnterPosition
exchangeSelect=this.handleExchangeSelect
/>
//... the function:
@bind
handleEnterPosition(position: number)
this.setState( position )
SearchSelect
<SearchExchanges
selected=selected
exchange=exchange
exchanges=exchanges
checkAggregate=checkAggregate
aggregate=aggregate
enterPosition=this.props.enterPosition
exchangeSelect=this.props.exchangeSelect
/>
ExchangeInfo
import React from 'react'
import bind from 'decko'
import IAsset, IMarketAsset from '../../shared/types'
import EnterPositionStyle from '../../styles'
interface IPropsInfo
asset: IAsset
interface IPropsCount
exchanges: IMarketAsset[]
interface IPropsPosition
asset: IAsset
enterPosition(position: number): void
export const ExchangeSelectInfo = (props: IPropsInfo) =>
<h2>Exchanges with <span>props.asset.currency</span> denominated in BTC, ETH, USD, USDC, or USDT will be listed above. Otherwise the asset's price will be an aggregate of supported exchanges.</h2>
export const ExchangesCount = (props: IPropsCount) =>
const exchanges = props
const pural = exchanges.length > 1 && 's'
return (<option key='default'>(exchanges.length) Exchangepural:</option>)
export class EnterPosition extends React.Component<IPropsPosition>
render()
const asset = this.props
return (
<EnterPositionStyle>
<h2>Enter your <span>asset.currency</span> position in order to add asset to your Portfolio. Or add the asset to your Watchlist.</h2>
<input type="number" placeholder="Enter Position" onChange=this.handleChange />
</EnterPositionStyle>
)
@bind
private handleChange(event: React.FormEvent<HTMLInputElement>)
const target = event.target as HTMLInputElement
const parsed = parseFloat(target.value)
const position = Number.isNaN(parsed) ? 0 : parsed
console.log('target.value', target.value);
this.props.enterPosition(position)
It works on the web fine: https://moon.holdings (Or https://dev.moon.holdings) (Click on the + select an asset, then Aggregate then try to enter in position.
However on mobile it only lets me put in an actual phone number, and typing does not change the input :(
UPDATE
Seems that it's an iPhone issue, my Android friends can add in positions, but not my iPhone ones. Strange....
UPDATE
I added an input to the root component / container and it works... seems like the problem is that the input I'm using is embedded 3 components down. Or something related to that.



javascript ios reactjs input mobile-safari
|
show 2 more comments
In my React/NextJS app, I have this simple input:
Components:
Search > SearchSelect > ExchangeInfo.tsx:
Search.tsx
<SearchSelect
assets=assets
selected=selected
exchange=exchange
exchanges=exchanges
fetching=fetching
aggregate=aggregate
checkAggregate=this.handleCheckAggregate
enterPosition=this.handleEnterPosition
exchangeSelect=this.handleExchangeSelect
/>
//... the function:
@bind
handleEnterPosition(position: number)
this.setState( position )
SearchSelect
<SearchExchanges
selected=selected
exchange=exchange
exchanges=exchanges
checkAggregate=checkAggregate
aggregate=aggregate
enterPosition=this.props.enterPosition
exchangeSelect=this.props.exchangeSelect
/>
ExchangeInfo
import React from 'react'
import bind from 'decko'
import IAsset, IMarketAsset from '../../shared/types'
import EnterPositionStyle from '../../styles'
interface IPropsInfo
asset: IAsset
interface IPropsCount
exchanges: IMarketAsset[]
interface IPropsPosition
asset: IAsset
enterPosition(position: number): void
export const ExchangeSelectInfo = (props: IPropsInfo) =>
<h2>Exchanges with <span>props.asset.currency</span> denominated in BTC, ETH, USD, USDC, or USDT will be listed above. Otherwise the asset's price will be an aggregate of supported exchanges.</h2>
export const ExchangesCount = (props: IPropsCount) =>
const exchanges = props
const pural = exchanges.length > 1 && 's'
return (<option key='default'>(exchanges.length) Exchangepural:</option>)
export class EnterPosition extends React.Component<IPropsPosition>
render()
const asset = this.props
return (
<EnterPositionStyle>
<h2>Enter your <span>asset.currency</span> position in order to add asset to your Portfolio. Or add the asset to your Watchlist.</h2>
<input type="number" placeholder="Enter Position" onChange=this.handleChange />
</EnterPositionStyle>
)
@bind
private handleChange(event: React.FormEvent<HTMLInputElement>)
const target = event.target as HTMLInputElement
const parsed = parseFloat(target.value)
const position = Number.isNaN(parsed) ? 0 : parsed
console.log('target.value', target.value);
this.props.enterPosition(position)
It works on the web fine: https://moon.holdings (Or https://dev.moon.holdings) (Click on the + select an asset, then Aggregate then try to enter in position.
However on mobile it only lets me put in an actual phone number, and typing does not change the input :(
UPDATE
Seems that it's an iPhone issue, my Android friends can add in positions, but not my iPhone ones. Strange....
UPDATE
I added an input to the root component / container and it works... seems like the problem is that the input I'm using is embedded 3 components down. Or something related to that.



javascript ios reactjs input mobile-safari
So what doeshandleSearchTypinglook like?
– GProst
Mar 28 at 21:33
@GProst just added it!
– Leon Gaban
Mar 29 at 1:03
I have one guess that for some reason in iOS Safari React marks the input as 'controlled' if you provideonChangehandler even if you don't providevalueprop. So React doesn't update the input value on input change automatically. I can't currently check that theory, so I believe you can check if input starts working once you remove theonChangehandler?
– GProst
Mar 29 at 2:01
Oh it's because I'm passing the handler down period.. hmm the only input that works on Mobile is one where the handler is in the same file... ugh ok I may have to resort to using Redux for the other inputs, which kinda sucks... doesn't make sense. Maybe this: stackoverflow.com/questions/40795906/…
– Leon Gaban
Mar 29 at 16:58
Wow ok that did not fix it, enterPosition was moved 2 components down, I changed it so that the input's onChange would exist in the same component and just passing the number up 2 components to it's parent. Will try again later, if that fails may have to attempt with redux, or possibly change the component structure when on smaller browser widths.
– Leon Gaban
Mar 29 at 18:59
|
show 2 more comments
In my React/NextJS app, I have this simple input:
Components:
Search > SearchSelect > ExchangeInfo.tsx:
Search.tsx
<SearchSelect
assets=assets
selected=selected
exchange=exchange
exchanges=exchanges
fetching=fetching
aggregate=aggregate
checkAggregate=this.handleCheckAggregate
enterPosition=this.handleEnterPosition
exchangeSelect=this.handleExchangeSelect
/>
//... the function:
@bind
handleEnterPosition(position: number)
this.setState( position )
SearchSelect
<SearchExchanges
selected=selected
exchange=exchange
exchanges=exchanges
checkAggregate=checkAggregate
aggregate=aggregate
enterPosition=this.props.enterPosition
exchangeSelect=this.props.exchangeSelect
/>
ExchangeInfo
import React from 'react'
import bind from 'decko'
import IAsset, IMarketAsset from '../../shared/types'
import EnterPositionStyle from '../../styles'
interface IPropsInfo
asset: IAsset
interface IPropsCount
exchanges: IMarketAsset[]
interface IPropsPosition
asset: IAsset
enterPosition(position: number): void
export const ExchangeSelectInfo = (props: IPropsInfo) =>
<h2>Exchanges with <span>props.asset.currency</span> denominated in BTC, ETH, USD, USDC, or USDT will be listed above. Otherwise the asset's price will be an aggregate of supported exchanges.</h2>
export const ExchangesCount = (props: IPropsCount) =>
const exchanges = props
const pural = exchanges.length > 1 && 's'
return (<option key='default'>(exchanges.length) Exchangepural:</option>)
export class EnterPosition extends React.Component<IPropsPosition>
render()
const asset = this.props
return (
<EnterPositionStyle>
<h2>Enter your <span>asset.currency</span> position in order to add asset to your Portfolio. Or add the asset to your Watchlist.</h2>
<input type="number" placeholder="Enter Position" onChange=this.handleChange />
</EnterPositionStyle>
)
@bind
private handleChange(event: React.FormEvent<HTMLInputElement>)
const target = event.target as HTMLInputElement
const parsed = parseFloat(target.value)
const position = Number.isNaN(parsed) ? 0 : parsed
console.log('target.value', target.value);
this.props.enterPosition(position)
It works on the web fine: https://moon.holdings (Or https://dev.moon.holdings) (Click on the + select an asset, then Aggregate then try to enter in position.
However on mobile it only lets me put in an actual phone number, and typing does not change the input :(
UPDATE
Seems that it's an iPhone issue, my Android friends can add in positions, but not my iPhone ones. Strange....
UPDATE
I added an input to the root component / container and it works... seems like the problem is that the input I'm using is embedded 3 components down. Or something related to that.



javascript ios reactjs input mobile-safari
In my React/NextJS app, I have this simple input:
Components:
Search > SearchSelect > ExchangeInfo.tsx:
Search.tsx
<SearchSelect
assets=assets
selected=selected
exchange=exchange
exchanges=exchanges
fetching=fetching
aggregate=aggregate
checkAggregate=this.handleCheckAggregate
enterPosition=this.handleEnterPosition
exchangeSelect=this.handleExchangeSelect
/>
//... the function:
@bind
handleEnterPosition(position: number)
this.setState( position )
SearchSelect
<SearchExchanges
selected=selected
exchange=exchange
exchanges=exchanges
checkAggregate=checkAggregate
aggregate=aggregate
enterPosition=this.props.enterPosition
exchangeSelect=this.props.exchangeSelect
/>
ExchangeInfo
import React from 'react'
import bind from 'decko'
import IAsset, IMarketAsset from '../../shared/types'
import EnterPositionStyle from '../../styles'
interface IPropsInfo
asset: IAsset
interface IPropsCount
exchanges: IMarketAsset[]
interface IPropsPosition
asset: IAsset
enterPosition(position: number): void
export const ExchangeSelectInfo = (props: IPropsInfo) =>
<h2>Exchanges with <span>props.asset.currency</span> denominated in BTC, ETH, USD, USDC, or USDT will be listed above. Otherwise the asset's price will be an aggregate of supported exchanges.</h2>
export const ExchangesCount = (props: IPropsCount) =>
const exchanges = props
const pural = exchanges.length > 1 && 's'
return (<option key='default'>(exchanges.length) Exchangepural:</option>)
export class EnterPosition extends React.Component<IPropsPosition>
render()
const asset = this.props
return (
<EnterPositionStyle>
<h2>Enter your <span>asset.currency</span> position in order to add asset to your Portfolio. Or add the asset to your Watchlist.</h2>
<input type="number" placeholder="Enter Position" onChange=this.handleChange />
</EnterPositionStyle>
)
@bind
private handleChange(event: React.FormEvent<HTMLInputElement>)
const target = event.target as HTMLInputElement
const parsed = parseFloat(target.value)
const position = Number.isNaN(parsed) ? 0 : parsed
console.log('target.value', target.value);
this.props.enterPosition(position)
It works on the web fine: https://moon.holdings (Or https://dev.moon.holdings) (Click on the + select an asset, then Aggregate then try to enter in position.
However on mobile it only lets me put in an actual phone number, and typing does not change the input :(
UPDATE
Seems that it's an iPhone issue, my Android friends can add in positions, but not my iPhone ones. Strange....
UPDATE
I added an input to the root component / container and it works... seems like the problem is that the input I'm using is embedded 3 components down. Or something related to that.



javascript ios reactjs input mobile-safari
javascript ios reactjs input mobile-safari
edited Apr 12 at 15:37
Leon Gaban
asked Mar 28 at 15:39
Leon GabanLeon Gaban
11.4k48 gold badges204 silver badges382 bronze badges
11.4k48 gold badges204 silver badges382 bronze badges
So what doeshandleSearchTypinglook like?
– GProst
Mar 28 at 21:33
@GProst just added it!
– Leon Gaban
Mar 29 at 1:03
I have one guess that for some reason in iOS Safari React marks the input as 'controlled' if you provideonChangehandler even if you don't providevalueprop. So React doesn't update the input value on input change automatically. I can't currently check that theory, so I believe you can check if input starts working once you remove theonChangehandler?
– GProst
Mar 29 at 2:01
Oh it's because I'm passing the handler down period.. hmm the only input that works on Mobile is one where the handler is in the same file... ugh ok I may have to resort to using Redux for the other inputs, which kinda sucks... doesn't make sense. Maybe this: stackoverflow.com/questions/40795906/…
– Leon Gaban
Mar 29 at 16:58
Wow ok that did not fix it, enterPosition was moved 2 components down, I changed it so that the input's onChange would exist in the same component and just passing the number up 2 components to it's parent. Will try again later, if that fails may have to attempt with redux, or possibly change the component structure when on smaller browser widths.
– Leon Gaban
Mar 29 at 18:59
|
show 2 more comments
So what doeshandleSearchTypinglook like?
– GProst
Mar 28 at 21:33
@GProst just added it!
– Leon Gaban
Mar 29 at 1:03
I have one guess that for some reason in iOS Safari React marks the input as 'controlled' if you provideonChangehandler even if you don't providevalueprop. So React doesn't update the input value on input change automatically. I can't currently check that theory, so I believe you can check if input starts working once you remove theonChangehandler?
– GProst
Mar 29 at 2:01
Oh it's because I'm passing the handler down period.. hmm the only input that works on Mobile is one where the handler is in the same file... ugh ok I may have to resort to using Redux for the other inputs, which kinda sucks... doesn't make sense. Maybe this: stackoverflow.com/questions/40795906/…
– Leon Gaban
Mar 29 at 16:58
Wow ok that did not fix it, enterPosition was moved 2 components down, I changed it so that the input's onChange would exist in the same component and just passing the number up 2 components to it's parent. Will try again later, if that fails may have to attempt with redux, or possibly change the component structure when on smaller browser widths.
– Leon Gaban
Mar 29 at 18:59
So what does
handleSearchTyping look like?– GProst
Mar 28 at 21:33
So what does
handleSearchTyping look like?– GProst
Mar 28 at 21:33
@GProst just added it!
– Leon Gaban
Mar 29 at 1:03
@GProst just added it!
– Leon Gaban
Mar 29 at 1:03
I have one guess that for some reason in iOS Safari React marks the input as 'controlled' if you provide
onChange handler even if you don't provide value prop. So React doesn't update the input value on input change automatically. I can't currently check that theory, so I believe you can check if input starts working once you remove the onChange handler?– GProst
Mar 29 at 2:01
I have one guess that for some reason in iOS Safari React marks the input as 'controlled' if you provide
onChange handler even if you don't provide value prop. So React doesn't update the input value on input change automatically. I can't currently check that theory, so I believe you can check if input starts working once you remove the onChange handler?– GProst
Mar 29 at 2:01
Oh it's because I'm passing the handler down period.. hmm the only input that works on Mobile is one where the handler is in the same file... ugh ok I may have to resort to using Redux for the other inputs, which kinda sucks... doesn't make sense. Maybe this: stackoverflow.com/questions/40795906/…
– Leon Gaban
Mar 29 at 16:58
Oh it's because I'm passing the handler down period.. hmm the only input that works on Mobile is one where the handler is in the same file... ugh ok I may have to resort to using Redux for the other inputs, which kinda sucks... doesn't make sense. Maybe this: stackoverflow.com/questions/40795906/…
– Leon Gaban
Mar 29 at 16:58
Wow ok that did not fix it, enterPosition was moved 2 components down, I changed it so that the input's onChange would exist in the same component and just passing the number up 2 components to it's parent. Will try again later, if that fails may have to attempt with redux, or possibly change the component structure when on smaller browser widths.
– Leon Gaban
Mar 29 at 18:59
Wow ok that did not fix it, enterPosition was moved 2 components down, I changed it so that the input's onChange would exist in the same component and just passing the number up 2 components to it's parent. Will try again later, if that fails may have to attempt with redux, or possibly change the component structure when on smaller browser widths.
– Leon Gaban
Mar 29 at 18:59
|
show 2 more comments
1 Answer
1
active
oldest
votes
Believe it or not, this is a css problem. Saw your page, you have these css on inputs that cause problem in safari.
user-select: none;
-webkit-user-select: none;
Remove them, and your inputs will get back to work. In case you have difficulty removing them, override with
-webkit-user-select: text;
user-select: text;
1
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
1
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55401621%2fon-ios-react-text-number-input-is-stuck-forcing-user-to-enter-in-phone-number%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Believe it or not, this is a css problem. Saw your page, you have these css on inputs that cause problem in safari.
user-select: none;
-webkit-user-select: none;
Remove them, and your inputs will get back to work. In case you have difficulty removing them, override with
-webkit-user-select: text;
user-select: text;
1
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
1
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
add a comment
|
Believe it or not, this is a css problem. Saw your page, you have these css on inputs that cause problem in safari.
user-select: none;
-webkit-user-select: none;
Remove them, and your inputs will get back to work. In case you have difficulty removing them, override with
-webkit-user-select: text;
user-select: text;
1
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
1
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
add a comment
|
Believe it or not, this is a css problem. Saw your page, you have these css on inputs that cause problem in safari.
user-select: none;
-webkit-user-select: none;
Remove them, and your inputs will get back to work. In case you have difficulty removing them, override with
-webkit-user-select: text;
user-select: text;
Believe it or not, this is a css problem. Saw your page, you have these css on inputs that cause problem in safari.
user-select: none;
-webkit-user-select: none;
Remove them, and your inputs will get back to work. In case you have difficulty removing them, override with
-webkit-user-select: text;
user-select: text;
edited Apr 18 at 15:54
answered Apr 18 at 15:40
hackapehackape
3,8861 gold badge6 silver badges17 bronze badges
3,8861 gold badge6 silver badges17 bronze badges
1
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
1
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
add a comment
|
1
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
1
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
1
1
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
Solution tested on iOS simulator, fixed. In fact, the same problem also affects desktop Safari.
– hackape
Apr 18 at 15:56
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
OMG thanks! That was it! :D Was starting to think this was unfixable...
– Leon Gaban
Apr 18 at 19:38
1
1
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
@LeonGaban no pb, you know css, it's easy
– hackape
Apr 19 at 15:26
add a comment
|
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55401621%2fon-ios-react-text-number-input-is-stuck-forcing-user-to-enter-in-phone-number%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
So what does
handleSearchTypinglook like?– GProst
Mar 28 at 21:33
@GProst just added it!
– Leon Gaban
Mar 29 at 1:03
I have one guess that for some reason in iOS Safari React marks the input as 'controlled' if you provide
onChangehandler even if you don't providevalueprop. So React doesn't update the input value on input change automatically. I can't currently check that theory, so I believe you can check if input starts working once you remove theonChangehandler?– GProst
Mar 29 at 2:01
Oh it's because I'm passing the handler down period.. hmm the only input that works on Mobile is one where the handler is in the same file... ugh ok I may have to resort to using Redux for the other inputs, which kinda sucks... doesn't make sense. Maybe this: stackoverflow.com/questions/40795906/…
– Leon Gaban
Mar 29 at 16:58
Wow ok that did not fix it, enterPosition was moved 2 components down, I changed it so that the input's onChange would exist in the same component and just passing the number up 2 components to it's parent. Will try again later, if that fails may have to attempt with redux, or possibly change the component structure when on smaller browser widths.
– Leon Gaban
Mar 29 at 18:59