[ 6 posts ]

binesh.gummadi

  • Joined: Sun Aug 02, 2009 7:10 pm
  • Posts: 24
  • Offline
  • Profile

Overlay + scrollview

Post Posted: Fri Apr 20, 2012 2:55 pm
+0-
Here is what I tried https://gist.github.com/2413100 but it doesn't work. What am I doing wrong? Can someone take a look at it please?

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Overlay + scrollview

Post Posted: Mon Apr 23, 2012 5:27 am
+0-
Some widgets don't behave well when you render then into a hidden container. In this case, ScrollView does some height computations when rendering and if it's hidden that will probably cause it to fail to read the right heights. If you wait until your container widget is visible, then the ScrollView will render ok. Try this:
Code:
overlay.on('visibleChange', function renderScrollview(e) {
    if (e.newVal) {
        overlay.detach('visibleChange', renderScrollview);
        scrollView.render();
    }
});

binesh.gummadi

  • Joined: Sun Aug 02, 2009 7:10 pm
  • Posts: 24
  • Offline
  • Profile

Re: Overlay + scrollview

Post Posted: Mon Apr 23, 2012 10:49 am
+0-
I tried and it doesn't work Juan. But I see what you mean and it makes sense.

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Overlay + scrollview

Post Posted: Mon Apr 23, 2012 1:24 pm
+0-
I made this from my iPod Touch and I see it working there: http://jsfiddle.net/cjBsZ/3/

binesh.gummadi

  • Joined: Sun Aug 02, 2009 7:10 pm
  • Posts: 24
  • Offline
  • Profile

Re: Overlay + scrollview

Post Posted: Mon Apr 23, 2012 2:37 pm
+0-
Ok it works with 3.5.0. I tried with 3.4.1. I guess I need to update to 3.5.0. Thank you Juan. Much appreciated.

binesh.gummadi

  • Joined: Sun Aug 02, 2009 7:10 pm
  • Posts: 24
  • Offline
  • Profile

Re: Overlay + scrollview

Post Posted: Sat Apr 28, 2012 4:12 pm
+0-
This trick fixed the problem but it is messing with scrollbar of the page. I cannot scroll after closing the overlay. I use MAC and I swipe fingers down to scroll down but after closing the overlay swipe doesn't work. I have tested this in multiple browsers. I will test in windows and update my findings but it is causing issue on MAC.

Any tip or trick to fix this? (I updated the gist)
  [ 6 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum