react-currency-input icon indicating copy to clipboard operation
react-currency-input copied to clipboard

Does Not Work with Safari

Open tgoldenberg opened this issue 7 years ago • 24 comments

If you have multiple inputs, the last one is focused and will not unfocus on Safari (both mobile and web)

Tried many different things, but unable to get anything to work. Any suggestions?

tgoldenberg avatar Sep 20 '17 20:09 tgoldenberg

The same issue. Could you please fix that?

eparh avatar Sep 25 '17 21:09 eparh

I forked the code and removed the componentDidMount and componentWillUpdate and componentDidUpdate functions. That did the trick

tgoldenberg avatar Sep 25 '17 21:09 tgoldenberg

Just want to say I have the same issue over here

theanchorsmith avatar Sep 28 '17 07:09 theanchorsmith

I'm also experiencing the same issue

nossila avatar Sep 28 '17 21:09 nossila

I'm also having the same issue

darianjug avatar Oct 20 '17 11:10 darianjug

It looks like it's not just Safari, it's iOS in general? I experience this with Chrome on my iPad as well (probably because they both use Webkit?). I haven't found a solution to this yet, so I'm considering writing my own or switching libraries.

albertkim avatar Oct 24 '17 20:10 albertkim

I was having this problem as well. I ended up fixing it by commenting out

node.setSelectionRange(selectionStart, selectionEnd)

in componentDidMount and componentDidUpdate. This fixes the issue and doesn't seem to have a negative impact on the selectAllOnFocus option. Not sure if it breaks other things...

Hope that helps.

bkoltai avatar Oct 27 '17 18:10 bkoltai

Has anyone put in a pull request or does a solid fork exist? What did you end up doing @albertkim?

acomito avatar Jan 04 '18 12:01 acomito

@acomito I wrote my own component that works for my needs - it's not production ready because it can't be configured with different currencies, formatting options, etc. but all I needed was the $ and the thousands , separator.

albertkim avatar Jan 07 '18 19:01 albertkim

@albertkim The package has 1,288 downloads in the last day, are people just not supporting safari or are 1,288 people all editing the node_modules folder?

acomito avatar Jan 30 '18 14:01 acomito

+1

bolutife-lawrence avatar Feb 05 '18 19:02 bolutife-lawrence

Is there a reason @bkoltai's fix isn't being merged in? Would be great to get this working.....great package, but I don't understand how anyone is actually using it without Safari support.

zthornto avatar Mar 28 '18 16:03 zthornto

+1. Please merge the fix!

anthonylebrun avatar May 25 '18 03:05 anthonylebrun

MERGE THE FIX!!!!

gask avatar Sep 12 '18 18:09 gask

Please merge

acomito avatar Oct 07 '18 22:10 acomito

Merge please.

hanssl avatar Oct 12 '18 23:10 hanssl

Same issue here... :(

hellobrunao avatar Nov 11 '18 18:11 hellobrunao

@brunocsousa the library is really small. I think I just copy-pasted it into my project as a custom component. Then you need to change a line or two (see this thread of course). It's been working since then.

acomito avatar Nov 11 '18 18:11 acomito

hey @acomito ... yeah, I just wanted to add +1 to the thread, and maybe the author of this wonderful component can update it with the solution... =]

I did the @bkoltai small hack on commenting those lines... it worked like a charm! Thank you guys.

hellobrunao avatar Nov 12 '18 17:11 hellobrunao

Unfortunately the fixed proposed seems to only fix the issue on the Desktop version of Safari. The field seems unusable on an iOS mobile device :(

olivierbuffon avatar Apr 08 '19 20:04 olivierbuffon

is this issue fixed now or not? i am experiencing this issue on safari desktop.

piyush-arora-quo avatar Aug 02 '19 20:08 piyush-arora-quo

Does anyone have a better solution?

yuripinage avatar Sep 09 '19 19:09 yuripinage

Still having this issue, but with Chrome too

azeveco avatar May 14 '21 15:05 azeveco

Still having this issue, but with Chrome too

Weird, I am only having focus issues on safari. Chrome and FF work fine. It drove me crazy though before I found this.

WesJourdan avatar Jun 03 '21 16:06 WesJourdan