Eliminating "delete" button in TextInput field on moble

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Eliminating "delete" button in TextInput field on moble

Erik J. Thomas
As you know, in mobile theme, TextInput uses StyleableStageText which is on the stage. On iOS, this field, once it contains a character will display a "delete" icon in gray in the right side of the field. If you tap it, the contents of the input field will be removed.

Is there a way to eliminate this button? Seems weird to want this gone, but it's complicated as I'm creating a right-to-left numeric currency entry field (like at ATMs) and the delete icon is in the way and not needed.

I've read all the code in the Skin hierarchy of classes used by TextInput on mobile theme: StageTextInputSkin, StageTextSkinBase, MobileSkin and the delete icon does not appear to be a skin part at all. Nothing in spark.components.TextInput, SkinnableTextBase, SkinnableComponent, or StyleableStageText contain any logic or properties relating to this delete icon.

Anyone know of a way I can eliminate this delete icon?

Thanks!

Erik

Reply | Threaded
Open this post in threaded view
|

Re: Eliminating "delete" button in TextInput field on moble

Lydecker
Hi, I think this is an easy fix (we had this issue a few years back).

If memory serves, we simply add the following attribute to out spark text
input:

autoCorrect="false"


If that doesn't work - let me know and I'll have a look at out code.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Eliminating "delete" button in TextInput field on moble

Erik Thomas
Unfortunately that didn't get rid of it. Remember, this is using mobile theme. Perhaps that's part of the issue.

But thanks for the suggestion! I never did try that one.

Erik

On May 18, 2019, at 5:48 PM, Lydecker <[hidden email]> wrote:

Hi, I think this is an easy fix (we had this issue a few years back).

If memory serves, we simply add the following attribute to out spark text
input:

autoCorrect="false"


If that doesn't work - let me know and I'll have a look at out code.



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
--
Message  protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.http://www.mailguard.com.au


Reply | Threaded
Open this post in threaded view
|

Re: Eliminating "delete" button in TextInput field on moble

Erik Thomas
Using TextArea works as a replacement. With a little styling and configuration I was able to make it do what I needed, and it doesn't automatically show the "delete" icon when there is content and it has input focus.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Eliminating "delete" button in TextInput field on moble

Lydecker
Well that is strange.

We are using a TextInput mobile component and don't have the circle with a
cross on the far right.

Here is our exact code:

                                <s:TextInput autoCorrect="false" autoCapitalize="none" prompt="username"
id="txt_user" change="usernameChanged(event)" width="{186*scaleBy}"
textAlign="left" contentBackgroundColor="0xffffff" fontFamily="Myriad Pro
Light" fontSize="{24*scaleBy}"/>

We are using Flex 4.7.1 but with the latest AIR. And we definatly had the
circle with cross initially, then amended something to give the code above
that removed it.... Like I say - this is going back 2 years now....



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/