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
Related
I'm struggling to understand and fix a problem I've been having when trying to use KeyboardAvoidingView to wrap some text inputs.
To aid my question, I've made an MVCE: https://snack.expo.io/#lee12f/brave-peanut
Please run this using the IOS simulator (or on IOS device) to reproduce the problem.
Clicking between the TextInput components (and around the screen) causes the KeyboardAvoidingView to toggle thus changing my View height. What am I doing wrong? How can I ensure the KeyboardAvoidingView remains enabled when clicking between the inputs?
As a bonus, it would be nice when clicking anywhere other than the inputs for the keyboard to close.
Thanks in advance
EDIT: If possible, without using 3rd party libraries.
try using react-native-keyboard-aware-scroll-view way easier to setup and it performs better in opinion
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'
<KeyboardAwareScrollView contentContainerStyle={{ flex:1,display:'flex' }} >
/... inputs here
</KeyboardAwareScrollView>
I have a dialog that contains a few text fields where the user can provide input, like this.
The problem im having is that whenever the user clicks on one of the textfields , the mobile keyboard messes everything up. It looks like this:
I want to have the dialog remain the same - as in, it shouldnt shrink and force the user to scroll down to see the full dialog. I tried using the FullscreenDialog-component, but the problem remains the same - the mobile keyboard just shrinks it and makes it scrollable for some reason. Is there any way to fix this?
EDIT I found a way to sort-of fix this, at least temporarily - add a minHeight to the bodyStyle in the dialog and the keyboard won't overwrite it. Obviously you have to move the dialog up so that the keyboard doesn't block it when it appears :)
I've experienced a similar problem but the solution may not help in every situation.
In my case, the main <Paper /> component height was set to window.innerHeight and another <Paper /> component inside it was set to about window.innerHeight * 0.6. I use this and not simply a CSS unit 'vh' since it compensates for the URL bar.
In the nested paper, I had a <TextField /> and the same problem you described occurred. The solution is basically to listen to onresize event since it fires when the keyboard opens, then you simply use the maxheight of all those measures.
To make it perfect you may want to respect device rotation since it really does require you to use the new height, and of course make sure the component is positioned correctly.
https://codesandbox.io/s/Op8BoLzQ
If you click on the first line, the editor cursor will show, but if you click on blank space below, nothing will happen.
I've tried to set min-height to height, now it is acting correctly regarding this issue, but the content is not auto-resizable anymore.
Yes. The problem is that the part of the editor that's contentEditable is only one line right now, here's a screenshot to illustrate which part of the editor is the dom node with contentEditable set to true.
Instead, if you want to make the area of the editable interface larger, you need to style .public-DraftEditor-content
I've forked the sandbox to show this
That fixes the issue.
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.
Any ideas why my checkbox from checkout page is not working ? (expanding?)
In Woocommerce settings I have checked Enable shipping and Ship to billing address by default, but i guess my issue is not from here. Do I have to check/uncheck some others to work?
Thanks in advance!
image with the issue: http://i.stack.imgur.com/DlPAz.jpg
I know it's been a while since the question was originally asked, but I've run into this same problem just recently (I think)--where the checkbox itself doesn't seem to respond to mouse-clicks, but the label for the checkbox does--and fixed it by editing the the code a little bit in the Woocommerce shipping address form template:
At around line 32 of "form-shipping.php", (YMMV) there's the label and below, the check box markup. For some reason, the checkbox (ID="ship-to-different-address-checkbox") doesn't seem to be responding to mouse-clicks properly, but the label is, so I just moved the closing tag of the label (e.g. "</label>") to after the checkbox input tag and the checkbox itself "comes alive" on the page....not a "nice" fix, but it works.
Another, potentially more "mainstream" solution is to append the CSS for the check box and bump the z-index up like so:
#ship-to-different-address-checkbox{
z-index: 10;
position: relative;
}