iscrollview not resizing correctly for wrapper containing textarea

105 Views Asked by At

I am using iscrollview [v1.3.7 (iscroll 4.2)] on a JQM 1.2 webapp (testing on android 5). The scrolling works fine initially but when the textarea is resized I am not able to scroll to the top of the page, to the bottom i can. After trying multiple options I am not sure how to overcome this issue.

Please see this jsfiddle https://jsfiddle.net/qhq2x7dp/4/: & reduce the size of the output screen so that once you go to textarea 3 or 4 you are not able to view the top two textarea elements. Now of you input in textarea 3 and it resizes you would no longer be able to scroll to the top textarea element. You can scroll downwards not upwards.

    <div data-role="content" class="iscroll_cont" data-iscroll>
      <div class="outer">
            <div class="ui-body ui-body-d">
                <fieldset class="ui-grid-a">
                        <div data-role="fieldcontain" class="ui-block-a">
                            <textarea  cols="10" rows="10" name="textarea" id="textarea0" placeholder="0" class="qcont" data-theme="a"></textarea>
                        </div>
                </fieldset>
            </div>
    ....
    ....<!-- Similar textarea 1 -->
    ....<!-- Similar textarea 2 -->
    ....<!-- Similar textarea 3 -->

      </div><!-- end of outer div -->
    </div><!-- end of content div -->

<script>
    $(document).on('touchstart change input paste click blur','textarea',function(){

      $('[data-role="content"]').trigger('create');

      $(".iscroll_cont").iscrollview("refresh");

    });
</script>

Screen shot from the jsfiddle : after textarea resize i am not able to scroll upwards

The issue is also similar to #41 listed in the link: https://code.google.com/p/iscroll-js/issues/detail?id=17 but i was not able to find a solution there.

Any help is appreciated. Thanks!

[P.S. I have picked up the jsfiddle external resources from Gajotres, let me know if there are any IPR issues, if so i can remove them and try to find alternate CDNs]

0

There are 0 best solutions below