Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9172291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:18:38+00:00 2026-06-17T16:18:38+00:00

In iOS, even for textareas contained in a div with position: fixed , when

  • 0

In iOS, even for textareas contained in a div with position: fixed, when a textarea has focus, the OS ensures that it is visible (which sometimes means sliding the entire browser window up) so that the textarea isn’t hidden by the keyboard.

In Android browsers (I’ve tested the stock browser in both 2.3 and 4.0 as well as Chrome in 4.0), this does not happen. The textarea gets covered by the keyboard, and the user can’t see what she’s typing.

As a temporary workaround for Android only, I set position: fixed on textarea:focus and move it to the top of the screen so that it’s guaranteed to be visible.

Are there any more elegant solutions that maintain the integrity of my layout?

I made a little example in jsfiddle. View in an Android browser to see what I mean: http://fiddle.jshell.net/5cvj5/show/light/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:18:39+00:00Added an answer on June 17, 2026 at 4:18 pm

    What I ended up doing, and what I found that Facebook does to overcome the same challenge, was to add a spacer block element below the textarea when it receives focus and then to scroll to the bottom of the view, like so:

    var android_spacer = $('<div/>', {
        'class' : 'android_spacer'
    }).css({
        'width'  : '100%',
        'height' :  '200px'
    }).appendTo($('#parent_view'));
    
    $('#the_textarea').on('focus', function() {
        $(this).after(android_spacer);
    });
    
    $('#the_textarea').on('blur', function() {
        $('.android_spacer').remove();
    });
    

    Note that there’s only ever one spacer onscreen at a time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see iOS applications like Facebook that send notifications even if the application hasn't
I just upgrade to iOS 6 xcode 4.5 But I found that even in
Is there an iOS function that would allow an application to fetch data even
I know that in iOS, even if web developers stipulate user-scalable=no the user can
Edited:[All the following happens even on stock IOS browser] I have a UiWebView which
In iOS, how would I instruct the OS to keep my app running even
I trying to fix a strange bugg. People with IOS 4 can't even start
I'd like to develop an iOS app that fixes tags in the user's music
I have an application that supports iOS 2.x. I am about to revamp this
Transparency is evil, on iOS devices even more so than on heavier machines. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.