facebook

Dynamic scroll area of panel

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #337487 Reply

    alonso100
    Member

    Hi,

    I use an HTML-widget within a panel for displaying information. The amount of information is variable and therefore the content area height of the panel must be dynamically set. I do it with this code:

        var html_height = '700';
        var panel_height = '800';
        
        $('#m1-test-html1').css('height', html_height);
        $('#m1-test-panel1-scroller').attr('data-layout-content-height', panel_height);
        $('#m1-test-panel1-scroller').height(panel_height);
        //phoneui.preprocessDOM("#m1-test");

    The problem is that the simulator and my smartphone do not recognize the new height until I rotate the device or an event occurs. Only then I see the vertical scroll bar. Before that the area is not scrollable. I´ve been reading here similar problems and find no solution to the problem (although some persons mention that it works for them).

    I checked the DOM and find no clue that leads to a problem neither in the code nor in the DOM. Any clues ??

    In the attachment the example.

    Attachments:
    You must be logged in to view attached files.
    #337494 Reply

    Hi Alonso,

    Please take a look at this tutorial that explain How to Scroll an HTML Widget:
    Let us know how it goes for you.

    #337511 Reply

    @support-octavio wrote:

    Hi Alonso,

    Please take a look at this tutorial that explain How to Scroll an HTML Widget:
    Let us know how it goes for you.

    I can report the same issue. When device return on screen after typing a subject into one field, the panel’s scroll bar disappear and the screen is only partial visible and not scrollable anymore.
    Also doing a refresh calling the DOM the result is the same. I’m able to see again scroll bar only changing panel or screen (and come back), or rotating device and come back to the first orientation.

    Plase try this and let us know any workaround.
    Thanks,
    Max

    #337921 Reply

    epet
    Participant

    I can report an issue that must be in the same root as the other guys before me.

    App on Android having a screen with a panel -containing 2 lists- with dynamic height calculated programmatically.
    Although the TC shows it is working just fine, on a android phone, the panel does not refresh until the screen of the phone is touched!

    
          phoneui.preprocessDOM('#m1-MobileSeas5-MainPanel');
          var $scroller = $('#m1-MobileSeas5-MainPanel-scroller');
          var liCount = $("li", $scroller).length;
          var panelHt = 185 + (liCount * 44);
          $scroller.css("height", panelHt + "px");
          $scroller.attr('data-layout-content-height', panelHt);
          $scroller[0].myScroll.refresh();
          phoneui.preprocessDOM('#m1-MobileSeas5-list1');
          phoneui.preprocessDOM('#m1-MobileSeas5-list4');
    

    UPDATE:

    Problem “solved” by doing a scroll event.

    
          $('#m1-MobileSeas5-MainPanel-scroller')[0].myScroll.setPosition(0,2000,true);
    
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Dynamic scroll area of panel

You must be logged in to post in the forum log in