split icon indicating copy to clipboard operation
split copied to clipboard

Gutter wraps under container when client resizes the browser

Open AdamMikacich opened this issue 8 years ago • 5 comments

splitjsbug Steps to reproduce bug:

  1. (optional: reset sizes)
  2. Drag a gutter fully to the right or collapse the gutter.
  3. Minimize the browser by resizing it to the left.

Bug The gutter on the right wraps under the container instead of staying at 100% within the container.

Question Is there a current solution to prevent the gutters from wrapping outside of the container?

AdamMikacich avatar Jun 13 '18 04:06 AdamMikacich

Yeah.. I'm having the same issue in my app.. Completely breaks everything.. the gutter forces itself down below the main area. It has to do with float: left on the butter but I can't figure out why it's triggered.

InputNeuron avatar Sep 22 '18 15:09 InputNeuron

A potential work around seems to be to use display: table and display: table-cell for the sidebars BUT calc() with percentages minus a px width doesn't work.

It DOES work properly with only percentages though. It also seems to properly factor in the width of the gutter. Just don't know if it works on other browsers.

InputNeuron avatar Sep 22 '18 15:09 InputNeuron

ok... this is a work around...

create the splitter like this:

        elementStyle: (dimension: 'width' | 'height', elementSize: number, gutterSize: number) => {
            return {
                width: `${elementSize}%`
            };
        },

then use display: table on the parent and display: table-cell on all the boxes. Seems to work fine. I'll report more when I get it in production.

InputNeuron avatar Sep 22 '18 15:09 InputNeuron

Why was this closed... is it fixed? If so I'd like to know so I can update :)

InputNeuron avatar Oct 10 '18 00:10 InputNeuron

Yes, this is fixed.

nathancahill avatar Oct 10 '18 05:10 nathancahill