Height of 100% doesn't work with flex-grow parent on Safari/macOS.
See original GitHub issueHello CodeMirror Team. Thanks for an amazing open-source project! ❤️
Bug details:
This bug was tested with CodeMirror versions 5.48 and 5.49.
The parent of the editor is sized with flex-grow
.
The editor size is set with editor.setSize("100%", "100%");
.
The editor doesn’t fill the parent on Safari (v13.0.3, macOS 10.14.6). It works fine on Firefox and Chrome.
Here’s a link to a reproduction of the problem: https://jsfiddle.net/f2xwdkro/
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Height of 100% doesn't work with flex-grow parent on Safari ...
The editor doesn't fill the parent on Safari (v13.0.3, macOS 10.14.6). It works fine on Firefox and Chrome. Here's a link to a...
Read more >Chrome / Safari not filling 100% height of flex parent
Solution. Use nested flex containers. Get rid of percentage heights. Get rid of table properties. Get rid of vertical-align . Avoid absolute positioning....
Read more >100% height doesn't work within a flex item in a flexbox
I have the same issue, basically, if the size of element is affected by flexgrow flexshrink or stretch. then its children's percentage size...
Read more >flex-grow - CSS: Cascading Style Sheets - MDN Web Docs
This property specifies how much of the remaining space in the flex container should be assigned to the item (the flex grow factor)....
Read more >Safari Technology Preview Release Notes - Apple Developer
Updates to Safari Technology Preview are no longer available for macOS Big Sur. If you already have Safari Technology Preview installed, you can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, the CodeMirror wrapper div expects to be display: block. You’ll probably need to add another intermediate wrapper element to work around this.
Going to close this, since I don’t know of a credible way to work around the Safari bug on the CodeMirror side.
Btw, the intermediate wrapper idea worked well. Thanks.
I added wrapper2 as child of the flexbox element and CodeMirror as a child of wrapper2.
Edit: The flexbox element should be set to
position: relative
to contain wrapper2.