1

I have this sample code below. It works as I expect in Firefox, but in Chrome when I type something in the textarea, the textarea goes on bottom of the page. I'd like it to be kept in always the same place (when typing too). So it works as expected in Firefox, but works differently in Chrome..

<p>dssdfdsdsfhellow sd dsd fd fs<br /> <br /> dfsdfsdf sdf</p>
<p>sd</p>
<p>sd</p>
<p>&nbsp;</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>&nbsp;</p>
<p>sd</p>
<p>sd</p>
<p>ds</p>
<p>&nbsp;</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>&nbsp;</p>
<p>sdf</p>
<p>sdf</p>
<p>sd</p>
<p>fsd</p>
<p>&nbsp;</p>
<p>sd</p>
<p>sd</p>
<p>ds</p>
<p>&nbsp;</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>&nbsp;</p>
<p>sdf</p>
<p>ds</p>
<p>dsf</p>
<p>sd</p>
<p>sd</p>
<p>&nbsp;</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>sd</p>
<p>f<br /><br /> dfs<br />

<form style="position: sticky; bottom: 0;">
<textarea></textarea>
</form>
Tomasz
  • 1,288
  • 18
  • 36
  • 1
    I don't quite understand, so when you type in the textarea, it no longer stays at the bottom of the page as a sticky element? –  Apr 15 '17 at 19:49
  • Whem I'm on top of the page and start typing into the textarea, in Chrome this textarea is taken to the bottom of the page; I wanted it to stay exactly where I am (ie. on top of the page) when I'm typing in.. – Tomasz Apr 15 '17 at 20:05
  • 1
    Ahh, I see it now. [**Take a look at this**](http://stackoverflow.com/a/31472878/7236046), you need to prevent the focus on the textarea when you start to type within the `textarea` element. –  Apr 15 '17 at 20:11
  • Possible duplicate of [Disable scrolling when changing focus form elements ipad web app](http://stackoverflow.com/questions/6740253/disable-scrolling-when-changing-focus-form-elements-ipad-web-app) –  Apr 15 '17 at 20:12
  • 1
    I believe this is the same bug: http://jsbin.com/lutepowefi/1/edit?output – mikedidthis May 15 '17 at 10:43

0 Answers0