I'm stuck for almost a day now, I need help. I don't understand how chat web apps get around this... There are many posts in forums for this issue: I need my footer (or my header) on this page component to move based on height being less than or equal to a phone height, so it is always ready for the mobile keyboard. For this component (as opposed to a chat window component), I'd rather have (1)the header on screen + (2)the textbox not behind the keyboard than (x3)having the textbox at the bottom of the screen when keyboard is closed (I actually want to keep the keyboard open if autofocus would trigger on mobile) input textbox hidden &
header hidden
Here are some stackoverflow threads that describe this problem: Short/Sweet 7/20/17 Similar case 3/22/19 These seem to have the answer but are in jquery which I don't yet understand or use input.focus which I don't know where to put it in reactjs
css
.New_Plan_Header {
position: fixed;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
z-index: 3;
top:0%;
width: 100%;
border: none;
height: 56px;
width: 100%;
background-color: #2fbaff;
color: rgba(255, 255, 255, 0.644);
font-family: "Muli", sans-serif;
font-size: 26px;
src: url(./UIConainers/Icons/Fonts/Muli-ExtraLight.ttf);
}
.plan-form {
position: absolute;
display: flex;
height: 56px;
width: 100%;
bottom: 0%;
color: #444;
font-family: "Muli", sans-serif;
font-size: 26px;
padding-left: 56px;
src: url(./UIConainers/Icons/Fonts/Muli-ExtraLight.ttf);
}
js
<div className="New_Plan_Header">Plan</div>
<input
type="search"
className="plan-form"
name="title"
value={note.title}
onChange={e => this.updateValue(e)}
placeholder="Title"
autoFocus={true}
autoComplete="off"
//onfocusin="transform: translateY(-600%), bottom:60%"
/>
Thanks for reading and your help in advance
Go to src/UIConainers/Plans/planpages/plannew.js & plannew.css