Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze headers on scroll in <ion-slide-box> #52

Open
dharti-ru opened this issue Jun 2, 2017 · 5 comments
Open

Freeze headers on scroll in <ion-slide-box> #52

dharti-ru opened this issue Jun 2, 2017 · 5 comments

Comments

@dharti-ru
Copy link

dharti-ru commented Jun 2, 2017

Hello,

I am using in my mobile app. When scrolled in y-direction to fill up the fields, my tab headings go up.
screenshot_20170602-160933

screenshot_20170602-161228

I want to freeze the tab headers just as my main header. Can anyone please help.

@dharti-ru dharti-ru changed the title Free headers on scroll in <ion-slide-box> Freeze headers on scroll in <ion-slide-box> Jun 2, 2017
@uzumakinaruto123
Copy link

@RohitrahD Try adding scroll="false" to your main outer <ion-content>. Then add independent ion-content/ion-scroll within each ion-slide

Something like this,

<ion-content scroll="false">
    <ion-slide-box show-pager="false" ion-slide-tabs>
        <ion-slide ion-slide-tab-label="test">
               <ion-scroll>
                        <h1>Tab 1</h1>
                        // Your Form
                </ion-scroll>
        </ion-slide>
    </ion-slide-box>
</ion-content>

@dharti-ru
Copy link
Author

@uzumakinaruto123 I tried the code give by you but it didn't work :(

@uzumakinaruto123
Copy link

what happens with this structure? Did main content scrolling stop? The first thing to do is stop the content scroll.

Maybe ion-content properties are getting overridden. Force ion-content to not scroll overflow:hidden in page css OR if the content has stopped scrolling and ion-scroll is not scrolling then <ion-scroll> is missing some property like direction maybe. Sorry I lost touch with Ionic 1 :p

@dharti-ru
Copy link
Author

@uzumakinaruto123 I noticed one thing in my code now.

For .slider-slide class, height is set to 100%. The slide container's height was 622px. So when I changed it to 500px i.e. less than 600px, it started scrolling. But the issue is what to do when it comes to different dimensions of device?

I even tried height: auto but it takes 100% by default.

@uzumakinaruto123
Copy link

Using px units would be a temporary fix! Keep height: 100% and add overflow:scroll !important . It would get easier if you could reproduce it with plunkr or jsfiddle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants