-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Proposal: Non-scrollable page content #5987
Comments
I propose a nested <ion-content fixed>
<ion-content> scrollable</ion-content>
<div style="position:absolute; bottom: 10px>Fixed HUD</div>
</ion-content> |
I think having several And since they are independent animations, the browser would keep them in different layers, affecting the performance |
More thoughts about why I think a nested solution is the best option:
|
I think we have agreed it needs to be nested within
Thoughts? |
@adamdbradley I like it 👍
|
Going to go with
|
PR is merged. 👍 Will be released with beta.4! #5992 |
Can you add this in the Docs Please? |
@danielehrhardt Issue created for docs to get added: https://github.com/driftyco/ionic-site/issues/776 |
Using RC1, this component is non-existent. There is, however, and Did this get removed? |
@jgw96 may be it is time to reopen this issue since there is no solution to this. Moveover, there is no reference to |
@shyamal890 Please see my comment here: https://github.com/driftyco/ionic-site/issues/776#issuecomment-258487040 This feature exists so there is no action for us to take on the framework. That issue on the ionic-site repository is open for us to document it better. If there is additional functionality you'd like this feature to have please create a new issue for it. Thanks! :) |
@brandyscarney the example in the link you gave points to nothing, the link is broken, could you show what piece of code gives the result in the screenshot? Personally I tried the following setup:
And the "Fixed content" text appears on top of "Not fixed". I saw in issue #9071 that someone suggest hacking it to set the height manually so that the div not fixed would appear below. If that is the case and everyone has to add some code to make this work, how can you call this "a feature"? |
@mebibou I updated the link in my comment to point to the correct file. Added the code to the details below (click to expand them) in case the link breaks in the future:
When you place elements in an
Would render as:
But when you add the
becomes:
The
and it takes on the same amount of margin for the header/footer as the content so it is still "in" the content, just not the scrollable section. This was our intention with the attribute, to have a separate "content" section that doesn't scroll with the other content. I'm not sure I entirely understand what you're expecting the attribute to do. Do you have any pictures of what it is doing vs what you're expecting? Thanks! |
@brandyscarney hum I guess like most people I did not understand what |
@mebibou You can still use it to achieve what you want with your example. I updated it to add some It would be better if we could add the height of the |
@brandyscarney yep that's the idea, something that would be automatic, cf #9071 |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
By default,
ion-content
is the scrollable area, and it's the element which is grabbed by transition animations when transitioning between pages.However, some content within pages should not be scrollable. For example an app could have a fixed div that needs to hover over the entire page, but it shouldn't be scrollable.
ion-header
andion-footer
for the most part are for fixed content (however, they do not work yet with transitions).Right now there's no clean way to also have fixed content transition with the page.
How should users add fixed content to pages?
A few ideas:
[fixed-content]
attribute withinion-content
:ion-fixed-content
element as a sibling toion-content
:ion-content
elements, and add an attribute to the content element that shouldn't be scrollable:ion-header
orion-footer
for these scenarios, even if the content doesn't actually visually look like a footer:Thoughts? @brandyscarney
The text was updated successfully, but these errors were encountered: