I've got an issue with the textfield : the content disappears 1 sec after typing and it's displayed normally when I unfocus the textfield.
It's occurs only on Android, not in the simulator.
Thank you & merry christmas !
Check that the selected style for the text field wasn't manipulated in any way so the colors make it appear transparent.
Related
I have Text components in one Text component. Onpress for Text components fires on the Text below the one pressed on Android device.
On Web works good.
Seems like due to default extra top padding for a Text - this is why when pressing on one Text the finger touches the one below.
Any help apprecciated.
Line-height doesn't help, increasing padding-bottom works but since it's an inline component I have to change it to inline-block but it doesn't work for Android.
I'm using Dropdown menu from PrimeReact library. I have just noticed that when I press on input field windows pops up and looks as it normally should, picture below.
But when I keep it open and scroll the screen window moves with the screen, which is strange and of course not wished behaviour.
This is how it's implemented
<Dropdown
name={`multisports.${index}.multisportType.cost`}
value={multisportType.cost}
options={sortedMultisportCost}
onChange={handleChange}
placeholder="Select cost"
/>
Can You please suggest how can I fix this bug ?
Issue reported here: https://github.com/primefaces/primereact/issues/2683
PR submitted to fix it: https://github.com/primefaces/primereact/pull/2757
I have a multiline TextField
TextField msgField = new TextField();
msgField.setMaxSize(10000);
msgField.setGrowLimit(5);
msgField.setSingleLineTextArea(false);
The TextField is the only focusable element in the form, and gets focus from straight after form.show() onwards
When this TextField contains more lines than its limit (5 lines), and the pointer is pressed away from the TextField, the TextField's content scrolls away even though if another key is pressed it continues writing where the cursor was. On Android, line formatting changes (extra spacing is added between lines).
Is there a way to prevent this behavior?
Screenshots (from Android, even though this also happens in the Simulator. I include Android because it shows the line formatting issue)
Before pressing away:
After pressing away (notice scrolling has changed and line spacing has increased):
Edit: My intuition tells me I need to override TextField's pointerReleased. But how?
this is a self-answering question.
I got a problem and now solved it. If anybody get this problem, here is the problem:
When focusing to input/caph-input keyboard is not appearing
Solution:
as default element.focus() is enough to show keyboard, but sometimes input element's style info filled with "-webkit-user-select: none" attribute. Before calling element.focus() you need to clear style
I would like to know if it's possible to have the native keyboard always visible. So I don't need to tap to have the text field in focus.
Thanks in advance.
That is the default behavior of Codename One at least on iOS & Android unless a fallback mode happened. This fallback mode happens when components can't be scrolled to e.g. if the text fields weren't in a box layout Y that's scrollable on a Y axis.