Hi folks, Am I the only person having endless issues with text inputs on mobile devices?
Although the previous issue I reported seems to have been resolved with build 140 of AIR ( Released March 29th 2017 ) there is a new issue ( on iOS ) where the text doesn't always appear in text inputs / areas until the component receives focus. This does not occur 100% of the time but its fairly frequent on all iOS versions I've tested on. Steps to reproduce: ( sample view attached ) 1. Add text inputs / text areas to a view and programatically set the text property. 2. Open the view a few times and text will not appear in at least one of the text inputs. I have tried changing the skin class but to no avail. Does anyone have a workaround by chance? Thanks, Paul On Thu, Mar 30, 2017 at 12:02 PM, Paul Moreau <[email protected]> wrote: > Thanks Josh, > > Yesterdays AIR update seems to have resolved the issue. > > Paul > > On Wed, Mar 29, 2017 at 6:49 PM, Josh Tynjala <[email protected]> > wrote: > >> It's been my experience that flash.text.StageText has multiple issues with >> AIR 25.0.0.134. I believe that the Flex TextInput uses StageText on >> mobile, >> so you may be running into these bugs. >> >> It looks like there's a new AIR 25 beta on Adobe Labs today, so I think >> they're planning to release an update to AIR 25 soon. I see in the release >> notes that some StageText issues have been fixed. You might try using that >> build instead of the released version. >> >> Since a stable build of AIR 25 has been released, you may not see a beta >> build in the Flex SDK Installer anymore. You can overlay the beta AIR SDK >> over the Flex SDK manually using these instructions: >> >> https://helpx.adobe.com/x-productkb/multi/how-overlay-air- >> sdk-flex-sdk.html >> >> - Josh >> >> On Wed, Mar 29, 2017 at 11:04 AM, Paul Moreau <[email protected]> >> wrote: >> >> > Hi folks, >> > >> > I'd normally go to StackOverflow but I usually find that Flex issues >> > posted are normally met with tumbleweed... >> > >> > I have included an mxml view file if anybody wants to replicate. I tried >> > to include the entire project but the zipped file was too large. >> > >> > *Issue :* Text not visible on TextInput until user focuses on another >> > component. >> > >> > *Steps to replicate :* >> > *( using Flex 4.16 AIR 25 running on an iOS device , not an emulator >> )* >> > >> > Create a TextInput ( use the default skin ) >> > Navigate to another view >> > Pop back to original view >> > Click on TextInput >> > Type value ( no text appears , caret also not visible ) >> > Click off TextInput ( text appears ) >> > >> > I am using 'DestructionPolicy = never' as I need the user to be able to >> go >> > to a new form on the fly and then pop back to the main form without >> losing >> > the data or the scroll position. >> > >> > I've noticed on iOS 10.0+ , an undo/redo popup appears after pressing >> > back... >> > >> > Any ideas? >> > >> > Thanks, >> > >> > -- >> > >> > >> > >> > >> > >> > >> > *DISCLAIMER: This electronic message together with any attachments is >> > confidential. If you are not the intended recipient, do not copy, >> disclose >> > or use the contents in any way. Please also advise us by return e-mail >> that >> > you have received the message and then please destroy. Zutec Ltd is not >> > responsible for any changes made to this message and / or any >> attachments >> > after sending by Zutec. We use virus scanning software but exclude all >> > liability for viruses or anything similar in this email or any >> attachment.* >> > >> > > > > -- > > > > > > > *DISCLAIMER: This electronic message together with any attachments is > confidential. If you are not the intended recipient, do not copy, disclose > or use the contents in any way. Please also advise us by return e-mail that > you have received the message and then please destroy. Zutec Ltd is not > responsible for any changes made to this message and / or any attachments > after sending by Zutec. We use virus scanning software but exclude all > liability for viruses or anything similar in this email or any attachment.* > -- *DISCLAIMER: This electronic message together with any attachments is confidential. If you are not the intended recipient, do not copy, disclose or use the contents in any way. Please also advise us by return e-mail that you have received the message and then please destroy. Zutec Ltd is not responsible for any changes made to this message and / or any attachments after sending by Zutec. We use virus scanning software but exclude all liability for viruses or anything similar in this email or any attachment.*
<?xml version="1.0"?> <!-- Created by Paul on 3/28/2017. Steps to replicate : Type in the first text field Click Done Type in any field Click back Click into any textinput and caret and text will not be visible --> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="buildComponents()" actionBarVisible="false" > <!-- destructionPolicy="never" --> <fx:Script><![CDATA[ import flash.ui.Keyboard; import mx.core.IVisualElement; import mx.core.UIComponent; import mx.events.FlexEvent; import mx.managers.IFocusManagerComponent; import spark.components.Button; import spark.components.HGroup; import spark.components.Label; import spark.components.TextInput; import spark.components.TextInput; import spark.components.VGroup; import spark.components.supportClasses.ScrollableStageText; import spark.components.supportClasses.ScrollableStageText; import spark.events.ViewNavigatorEvent; import spark.layouts.VerticalAlign; var container:VGroup = new VGroup(); private var _stepOneComplete:Boolean; private function buildComponents():void { _stepOneComplete = data && data == true; container.percentHeight = container.percentWidth = 100; container.top = 10; container.left = 10; container.right = 10; container.bottom = 0; container.gap = 40; addElement(container); var lblInstructions:Label = new Label(); lblInstructions.setStyle("fontSize" , 42); lblInstructions.setStyle("color" , 0xFF0000); lblInstructions.text = !_stepOneComplete ? "Type in the first text field \n" + "Then click Done \n" : "Now click back \n"+ "Then click into any textinput and caret and text will not be visible"; container.addElement(lblInstructions); var aryInputs:Array = ["name", "age", "address", "dob", "phone"]; for each(var strInput:String in aryInputs) { // create a vgroup for each field with a label and a text input var grpInput:VGroup = new VGroup(); var lbl:Label = new Label(); lbl.text = strInput; lbl.setStyle("color", 0x0e4472); var txtInput:TextInput = new TextInput(); /* if (strInput == "age") { txtInput.softKeyboardType = SoftKeyboardType.NUMBER; }*/ txtInput.text = "sample text"; grpInput.addElement(lbl); grpInput.addElement(txtInput); container.addElement(grpInput); } var buttonsContainer:HGroup = new HGroup(); buttonsContainer.bottom = 0; buttonsContainer.percentWidth = buttonsContainer.percentHeight = 100; buttonsContainer.verticalAlign = VerticalAlign.BOTTOM; var btnDone:Button = new Button(); btnDone.percentWidth = 100; btnDone.height = 100; btnDone.setStyle("color", 0x0e4472); btnDone.addEventListener(MouseEvent.CLICK, function btnDoneClicked(e:MouseEvent):void { if (!_stepOneComplete) { navigator.pushView(MainView, true); } else{ navigator.popView(); } }); btnDone.label = _stepOneComplete ? "Back" : "Done" ; buttonsContainer.addElement(btnDone); container.addElement(buttonsContainer); } ]]></fx:Script> </s:View>
