Overflow Issues with Flexbox #4142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm using flexbox grid in Foundation 6 and for some reason
display: flex;affects the overflow on the.CodeMirror-scrollelement causing it to not clip it's content and/or scroll. The whole page scrolls horizontally. Addingmax-widthto the.CodeMirror-scrollelement manages to patch the issue.Here's a working example of what I'm talking about
http://codepen.io/KnightYoshi/pen/akjVzj
changed title from {-Flexbox -}Overflow Issues to Overflow Issues{+ with Flexbox+}
Adding a max width or overflow to the .column also seems to fix the scrolling issue.
I don't really understand the problem -- if I load your example in Chrome 50, the editor, not the page, gets a horizontal scrollbar. Could you expand a bit, and preferably also reduce the CSS and wrapping element structure in your demo the absolute minimum (right now the CSS is quite huge, too huge for me to read through).
That's interesting, I hadn't checked Chrome. View it in Firefox 47+ (not sure about earlier versions or other browsers). I removed a bunch of CSS - I just grabbed all of the grid CSS when I initially created it.
Removing the flexbox properties it behaves as expected in Firefox; the editor scrolls, not the page. Which isn't really an option for me. So uncommenting either one of the commented out blocks also fixes it so that the editor scrolls and not the page.
Having this same issue when using with Bulma.
I can reproduce the issue with Firefox. I further reduced your CSS to
I also removed all loaded CSS and JS dependencies except codemirror.
mentioned in issue #3547
mentioned in issue #4895
Issue #4895 notes that this also happens for vertical (
flex-direction: column) layout -- there the height of the editor gets ignored by Firefox and Safarimentioned in issue #745
mentioned in issue #6241
For me, the issue was fixed using "overflow:auto" for the container of codemirror react component, and "flex:1" for all the components of the flex container, including codemirror.