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

bug[core, v5]: ion-content height 100% not inherited #20185

Closed
peterpeterparker opened this issue Jan 11, 2020 · 18 comments
Closed

bug[core, v5]: ion-content height 100% not inherited #20185

peterpeterparker opened this issue Jan 11, 2020 · 18 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@peterpeterparker
Copy link
Contributor

peterpeterparker commented Jan 11, 2020

Bug Report

Ionic version:
[x] 5.x

Current behavior:
In Ionic v5.x (current status, tested with @next and master) it will not be possible anymore to assign an height: 100% to the slotted element of the ion-content respectively such property will be ignored.

This would for example have for effect to break the GUI of our editor (see attached Gif).

The root cause of the issue, I think, is the recent introduction of the ion-content shadowed child <div id="scroll-content"/> (see related commit)

Expected behavior:
Still being able to use height: 100% for the content with Ionic v5.x.

Steps to reproduce:

git clone https://github.com/peterpeterparker/ionic-v5beta-content-height.git
cd ionic-v5beta-content-height
npm install
npm run start

Related code:

See demo repo

Other information:

Demo of our application (gif):

ezgif com-video-to-gif-2

Screenshots of the provided repo:

Capture d’écran 2020-01-11 à 18 14 21

Capture d’écran 2020-01-11 à 18 14 28

And a screenshot of the same repo with Ionic v4:

Capture d’écran 2020-01-12 à 08 35 12

@liamdebeasi
Copy link
Contributor

Thanks for the issue. Can you try the following dev build and let me know if it resolves your issue:

npm i @ionic/core@5.0.0-dev.202001131408.8aeda3a

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jan 13, 2020
@peterpeterparker
Copy link
Contributor Author

@liamdebeasi thank you for your feedback. same problem with build 202001131408.8aeda3a.

@liamdebeasi
Copy link
Contributor

Hmm maybe I'm not quite sure what you are trying to do. From what I understand, you are expecting the scrollable content to take up 100% of the available containing height by default. From there, you want to be able to control the overall dimensions of ion-content by setting the dimension on ion-content directly. Is that correct?

@peterpeterparker
Copy link
Contributor Author

@liamdebeasi yes

<ion-content>
    <div style="height: 100%">
    </div>
</ion-content>

height or min-height too I guess.

here a screenshot from our editor in prod with v4:

Capture d’écran 2020-01-13 à 17 08 01

@liamdebeasi
Copy link
Contributor

Thanks for the follow up. Try this dev build:

npm i @ionic/core@5.0.0-dev.202001131622.bfc6420

@peterpeterparker
Copy link
Contributor Author

super @liamdebeasi 202001131622.bfc6420 do solve the issue, thx!

I checked both the sample repo and our app.

Capture d’écran 2020-01-13 à 17 30 53

@corysmc
Copy link
Contributor

corysmc commented Jan 13, 2020

I'm noticing the problem as well @liamdebeasi also with build 202001131408.8aeda3a

all my zero states don't center on the page anymore 😦

image

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jan 13, 2020

@corysmc Please try 5.0.0-dev.202001131622.bfc6420. That previous build had a mistake in it.

@corysmc
Copy link
Contributor

corysmc commented Jan 13, 2020

should have refreshed the page before submitting my comments 😄
The latest build works now 5.0.0-dev.202001131622.bfc6420

Thanks @liamdebeasi!

@liamdebeasi
Copy link
Contributor

Thanks! This issue has been resolved via #20194. We will be putting out a new beta soon that has this fix.

@peterpeterparker
Copy link
Contributor Author

Thank you Liam 👍

@lincolnthree
Copy link

lincolnthree commented Jan 21, 2020

@liamdebeasi @peterpeterparker Unfortunately, this fix breaks elements with "position: sticky" inside the ion-content scroll-content div. Now that the height is set to 100%, once the div scrolls off screen, any sticky items (such as floating buttons/widgets/etc) scroll off screen with it.

This occurs when the height of the content contained inside the scroll-element exceeds 100% of the ion-content/viewport.

IMO: This should probably use the 'min-height: 100%' property, instead of 'height'.

Sample repo incoming.

@liamdebeasi
Copy link
Contributor

@lincolnthree Can you open a new issue? Thanks!

@lincolnthree
Copy link

Sure thing.

@lincolnthree
Copy link

@liamdebeasi Done.

@ghost
Copy link

ghost commented Jan 25, 2020

Hello, the problem still persists with the latest version 5.0.0-rc.0.

Any idea ?

regards,
Achille

@liamdebeasi
Copy link
Contributor

@LOUNNAS Please open a new issue. Thanks!

@ionitron-bot
Copy link

ionitron-bot bot commented Feb 26, 2020

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Feb 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

4 participants