-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[FEAT] Fixed Footer – content fixed to the bottom of the screen #240
Comments
Thank you @Toeler |
Hi @roman-rr. Here is a jsfiddle with an example: https://jsfiddle.net/sptjaobe/1/ It looks like your suggestion of I can see how it might be possible using some of the hacks from the Overflow Top-Middle example. But the requirement to show the button at the bottom of the screen even during the drag wouldn't work with that solution. (Also that hack resets the scroll position, which isn't desirable). |
Please confirm such scenario @Toeler
This is correct? Or button visible and fixed on middle point to? |
@roman-rr My goal is to have the button visible and fixed on the middle breakpoint. And in addition to that, when dragging from middle to top, the button is still fixed to the bottom of the screen. |
@Toeler Please check this revision and give me some feedback https://jsfiddle.net/romantonoff/0kz8efsL/ |
@roman-rr Yes, that is the behaviour I am after. But my preference is that the component that defines the content of the pane also defines and controls the button. With your proposed workaround, I would need the hoist the reply button to the component that shows/hides the sheet and then add logic in there to also show/hide the button. |
@Toeler Would you like to define bottom bar like so ? <ion-drawer>
// some content
<div class="bottom-toolbar" footer>
<button class="btn-reply">
Reply
</button>
</div>
</ion-drawer> When we just set attribute |
@roman-rr If that fits the style of the library then yes I do like that approach the most. As for the transition, that depends on the goals of the library. Yes, I need it visible at Mid and Top but not Bottom, but perhaps somebody else would want it visible at Bottom too. If you would like, I could work on a PR if you know what the library would like to offer. |
@Toeler Welcome to make a PR. You might try to make as you like it, and I will complete it afterwards before merge. |
What are you trying to add to Cupertino-Pane?
It would be good if there was a way to add content within a pane that was fixed at the bottom of the screen, no matter the position of the pane breakpoint.
Describe your feature request detailed
My use case is a Reply button/text input that needs to sit at the bottom of the screen when the pane is opened. If the user moves the pane from medium to top then the button/input should remain at the bottom.
I attempted this with the
offsetBottom
parameter and having the button/input be separate to the pane, which works when the pane is at the top, but when it is scrolled down it is rendered over the top.I also tried to use fixed positioning on the button/input when within the pane, but the issue is that the fixed positioning on the pane, combined with the transform, means that any children with fixed positioning are relative to the pane, and not the viewport (https://developer.mozilla.org/en-US/docs/Web/CSS/position#fixed_positioning).
Is there an alternative at the latest version?
[ ] Yes (descripe the alternative)
[x] No
Is this related to an issue?
[ ] Yes (Give a link to the issue)
[x] No
The text was updated successfully, but these errors were encountered: