waxmiguelito / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

Bad size of the view on Palm WebOS #272

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a WebSite with Iui (which uses the new version in 
http://www.iui-js.org/) on a Palm WebOs browser
2. Open a view with a lot of elements
3. Click on an element that will open a little view

What is the expected output? What do you see instead?
We see the new view, but the previous view (that is hidded) involved on the 
scroller. So, on the little view, we can scroll more than we need

What version of the product are you using? On what operating system?
Palm WebOS 1.4.5

Please provide any additional information below.
I found a way to resolve this:

1) when a view is hidded, set the style to overflow: hidden and height: 1px
2) before a view is open, we suppress the two previous style properties:

function slidePages(fromPage, toPage, backwards)
{        
    var axis = (backwards ? fromPage : toPage).getAttribute("axis");

    clearInterval(checkTimer);

    sendEvent("beforetransition", fromPage, {out:true});
    sendEvent("beforetransition", toPage, {out:false});
    toPage.style.removeProperty("overflow");    // -----> Fix height issue
    toPage.style.removeProperty("height");      // -----> Fix height issue

    if (canDoSlideAnim() && axis != 'y')
    {
      slide2(fromPage, toPage, backwards, slideDone);
    }
    else
    {
      slide1(fromPage, toPage, backwards, axis, slideDone);
    }

    function slideDone()
    {
      if (!hasClass(toPage, "dialog"))
          fromPage.removeAttribute("selected");
      checkTimer = setInterval(checkOrientAndLocation, 300);
      setTimeout(updatePage, 0, toPage, fromPage);
      fromPage.removeEventListener('webkitTransitionEnd', slideDone, false);
      fromPage.style.overflow = "hidden";       // -----> Fix height issue
      fromPage.style.height = "1px";            // -----> Fix height issue
      sendEvent("aftertransition", fromPage, {out:true});
      sendEvent("aftertransition", toPage, {out:false});
      if (backwards) sendEvent("unload", fromPage); // EVENT: UNLOAD
    }
}

Original issue reported on code.google.com by roche....@gmail.com on 5 Oct 2010 at 3:11

GoogleCodeExporter commented 9 years ago
Linked with the issue 180 (sorry, I don't see this issue).

Original comment by roche....@gmail.com on 7 Oct 2010 at 3:55

GoogleCodeExporter commented 9 years ago
Only problem I see with this approach is that then the view would start out 
scrolled all the way to the bottom (assuming the new page is long enough to 
scroll).  A better solution would be to make sure that the viewport is scrolled 
back to the beginning after each page change, perhaps with a window.scrollTo(0, 
1)?

Original comment by eslind...@gmail.com on 3 Aug 2011 at 3:51