Messing around with flutter and I must be missing it in the documentation somewhere because I'm not sure what this object or property is.
I am trying to use a multiline textformfield, and so to handle focus I've used
onTap: (){FocusScope.of(context).requestFocus(new FocusNode());},
What I've noticed is that I need to doubletap to reenter the form field now.
When I do double tap, I get this odd label/hint -- How can I remove or prevent it from showing?
Hint/Label?
Any info is appreciated :)
Edit: The reason I needed to double tap was because multi-line form fields switch the Pixel2 GO button to the newline button and prevents the user from exiting the keyboard cleanly.
Fixed by adding textInputAction: TextInputAction.go to the textformfield
If you just want to have the TextFormField work normally, you don't have to write your own onTap function. The built-in one works perfectly fine :)
Related
I'm getting this box when trying to press on the textformfield, it's rarely to happened by it look like a bug and it sticks to the screen even if I navigate to a different screen until I restart the app it disappears, did anyone faced something like this ?
This comes due to long press over text field,
If you want to avoid this you have to pass enableInteractiveSelection: false which avoids copy and paste and other interaction from user
I am using few inputs to submit data. When keyboard pops up, the ion-input fields get hidden and I cant see the input fields. From somewhere I read to set scrollEnabled true in config.xml file but that also doesn't solve issue. At the first launch of the application keyboard hides the input but from second launch keyboard doesn't hide input fields. How to solve this issue. Please help.
I was implementing a custom CellTable that has a infinite scroll feature using the CellList showcase example ( http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList ). However, I found a feature in CellList/Table that is undesirable in this case: changing visible range after clicking an item would cause the List/Table to be automatically scrolled to the selected item.
you can try the showcase example in above to see the exact same behavior. When no item is selected, the infinite scroll works just fine, but when you click an item and then scroll it, it will always jump back to the selected item when the range is changed.
I also found that it only happens when the focus is still on the item, that is, if you select an item and then click somewhere else to lose the focus, it wouldn't happen.
I've been digging around the GWT code and trying to find out how to disable this feature with no success. Did anyone handled this situation before?
As a simple workaround, you can call focus() on some element, to remove the focus from the item (without removing the selection).
In the showcase example, in ShowMorePagerPanel, add e.g.
scrollable.getElement().focus();
at the beginning of the onScroll(ScrollEvent event) method.
I ran into the same problem and couldn't get Chris's answer to solve it, but the following solution worked for me:
in your onScroll(ScrollEvent event) method, add a line similar to the following, assuming yourTable is an instance of something extending AbstractHasData
yourTable.setFocus(false);
I need to focus a text input into the Facebook login popup. I am using a virtual keyboard to simulate a physical one, but when I click a key, the text input lose focus and the letter is not written into the field.
How could I maintain the focus in the text input?
I'm not sure if creating your own virtual keyboard is a smart idea since all mobiles already have one in there, you just need to set useSoftKeyboard in Flex.
Also, you can always remove focusability to your components by setting focusEnabled and hasFocusableChildren to false.
I finally came to another solution... Using getElementsByTagName('theElementID'), I could get a reference to the textInputs in the browser, and I could modify its attributes...
For example,
emailStringObject =this.html.htmlLoader.window.document.getElementById('email');
emailStringObject.value="example#correo.com"
So the focus event causes the soft keyboard to come up for input fields. Im trying to find a way to stop this occuring. The reason is, as some of you may know, a click event has a 300ms delay before anything happens.
To get around this, we have implemented Googles FastButton http://code.google.com/mobile/articles/fast_buttons.html its working good after a minor tweak to also prevent a second mousedown, but if we click on a button and go to a second page that also has a input textfield, the keyboard still pops up.
I've tried preventing the touchend, mousedown, mouseend, click, firing again, and that helps it by not having the flashing cursor on the textfield but the keyboard is still there. If i blur the field you still see the keyboard popping up then disapparing which is not acceptable.
Any ideas?
Hmm... have you considered disabling the fields with disabled="disabled" while loading, and only then enabling them? It might let you get around the initial focused state that launches the keyboard, so that you can blur first, then enable?