#nishant_chandla

1 messages · Page 1 of 1 (latest)

unkempt pilotBOT
main zealot
#

Not super familiar but I can try

heavy palm
#

Okay, In this example I am using TextArea Component from stripe.

When I write something and press space immediately. The cursor(caret) position doesn't update. (Shown when I select the spaces added).

PS: the TextArea component works in some of the pages I am working with but doesn't work in some.

main zealot
#

Hi, sorry, my colleague will join shortly

unkempt pilotBOT
brave juniper
#

Hey! Taking over for my colleague. Let me catch up.

#

Could you please share the code you are using in order to display that UI ?

#

the TextArea component works in some of the pages I am working with but doesn't work in some.
What could be the difference with these pages ?

heavy palm
#

There is no difference between the two pages.

#

This is the code

#

The only difference is the defaultValue is different in both pages. I have already tried removing the defaultValue prop altogether. no luck

brave juniper
#

What about setContent method ?

heavy palm
brave juniper
#

This seems to be something updating the content in multiple places

#

Try removing the onChange and defaultValue of that TextArea and do a test to see if you still have the same behavior

heavy palm
#

Okay, Testing right now

#

gimme a minute

#

Tested with this, Same behaviour

#

no luck

brave juniper
#

Could you share with me the other TextArea code ?

brave juniper
#

Between, I'm not able to reproduce with this sample:

<TextArea
              label="Description"
              placeholder="Acme Inc was founded in…"
              defaultValue="Stripe Apps lets you embed custom…"
              onChange={(e) => {
                console.log(e.target.value);
              }}
          />
heavy palm
brave juniper
#

Do you have some kind of logic that is manipulating the value of that field depending on space character?

heavy palm
#

no

brave juniper
#

Try the test the code I shared above ?

heavy palm
brave juniper
#

Can you share more details about that ?

heavy palm
#

Okay i can share you screenshots in 5-10 mins. Afk

brave juniper
#

The main idea is that we can manage to reproduce your use case.

#

I think the first step is to figure out what is the difference in your two pages