framework7

Open full view…

Forcing left panel to top after it closes

MVRedHead
Wed, 11 Oct 2017 13:05:15 GMT

I admit, I'm new to F7. I can't figure out how to get to the left panel to force it back to the top when it closes so the next opening shows it at the top. Here's what I'm doing right now: $$('.panel-left').on('panel:closed', function () { console.log("scroll: " + $$('.panel-left').scrollTop()); $$('.panel-left').scrollTop(0, 0); console.log("did it"); }); The event handler is working on every close. But scrollTop() is always showing 0 no matter where the panel has been scrolled to. Clearly, it's not the .panel-left that has scrolled. What item under .panel-left has the scrolling? Similarly, when the panel is closed, I'd like to force the next re-open to the topmost (back) level. How do I force things back to the topmost view of the panel?