I got a strange bug since migrating from Ionic 4 to Ionic 5.
I have a modal with a canvas to draw on pictures. The canvas is fullscreen and there are translucent toolbars in the header and footer. The footer toolbar contains an ion-radio-group and an ion-range.
After each restart of the app, the first time (and only the first time) I enter the page with the canvas, the picture gets displayed wrong. It’s not fullscreen and behind the header and footer is a white background. Then the image is scrollable, what means that the header and footer aren’t overlaping the ion-content. After closing the canvas and reopening it, everything works fine, no matter if it’s a new picture or the same. It only doesn’t work the very first time after closing and opening the app again.
I noticed that this bug only occurs if the ion-range or ion-radio-group are in the header or footer toolbar. If I remove them, everything is fine.
The bug exists in Android and iOS.
With Ionic 4, everything worked as expected, but with Ionic 5 it does not. Is this a bug or am I missing a change from Ionic 4 to Ionic 5?
I don’t know Angular so just throwing out ideas… try delaying calculating the canvas size for a second or so (temporarily, as a test) to see if the modal is not fully drawn first time.
Also, what about using the ionModalDidPresent modal event, would that solve the problem if in fact the modal is not fully drawn?
What I noticed was, that it doesn’t matter if the canvas is loaded or not. Actually, if I load the modal with the ion-header, ion-footer and an empty ion-content, it still doesn’t behave correctly. If I color the backgrounds of header/footer and content differently, you can see that the first time you open the modal the ion-content is not fullsize. So it’s not a problem with the canvas
Sure, I just opened an issue today. You can find a reproduction repo there, I already got a reply from another member of the Ionic team. Thanks for your time!
You should wait until we get a confirmation here before opening an issue.
Reduces the chance of opening something that is a fix on your end vs anything else.
Yea, I know, sorry… But I just was pretty damn sure about this one because I recreated the bug on several platforms with several variations and I spend a lot of time with going through my end over and over again. I guess I was just not patient enough for your reply here