Handsontable: Rows are misaligned on the column/row resize demo

Created on 9 Apr 2015  路  30Comments  路  Source: handsontable/handsontable

Rows are misaligned by 1px (ht_clone_left copy is higher by 1px) in this demo: http://handsontable.com/demo/column_resize.html

image

alignmenheighwidth Freeze / Resize / Move Released Bug

Most helpful comment

I have this problem too!

I fixed the first two columns (fixedColumnsLeft: 2) and the first contains pictures that can vary in height.

The misalignment varies when I scroll vertically.

image

All 30 comments

Maybe this 1px misalignment is related. After scroll multiple lines cells are lower so fixed area has a 1px spare frame under.

zrzut ekranu 2015-04-10 o 09 27 07

Here's the 'cleared' version, when we add colHeaders: true we'll get a scroll like in this issue https://github.com/handsontable/handsontable/issues/2361

Issue no longer exists, it will stay closed but please leave us feedback if something it still misaligned.

Hi @AMBudnik,
I am still somehow getting slightly misalignment after using version 0.16.1.
Looks like the 1px starts to get expanded when there are more rows exist.
Starting from row 1 to row 7, see screenshot.

screen shot 2015-08-04 at 10 47 12 am

Here is the code I was using,

<html>
  <head>
    <link href="http://handsontable.com/bower_components/handsontable/dist/handsontable.full.min.css" rel="stylesheet" type="text/css">
    <script src="http://handsontable.com/bower_components/handsontable/dist/handsontable.full.min.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script>
      var data = [
        {}
      ];

      var container = document.getElementById('example');
      var hot = new Handsontable(container, {
        data: data,
        rowHeaders: true,
        minSpareRows: 1,
        width: window.innerWidth,
        height: window.innerHeight,
        colHeaders: true,

        columns: [
          { data: 'foo1', width: 400 },
          { data: 'foo2' },
          { data: 'foo3' },
          { data: 'foo4' },
          { data: 'foo5' },
          { data: 'foo6' },
          { data: 'foo7' },
          { data: 'foo8' },
          { data: 'foo9' },
          { data: 'foo10' },
          { data: 'foo11' },
          { data: 'foo12' },
          { data: 'foo13' }
        ]
      });
    </script>
  </body>
</html>

Edit:
Using Mac OS X 10.10.4 Chrome 44.0.2403.125

Could you please create a full demo @awsp ?

@AMBudnik
Here you are, its basically a clone from the above HTML code using Handsontable 0.16.1 at this moment.

http://awsp.github.io/handsontable/index.html

Tho I couldn't re-create this issue on JSFiddle (see demo). If anybody could check this out for me that, I would really appreciate that.

PS: Both demos were on the exact same browser.
PPS: Not sure what you mean for full demo, the data shown in the screenshot was from copy & paste, I tried to put those into the data object, and I still see misalignment.
PPPS: When browser is in different zoom levels, JSFiddle demo seems to give me misalignment as well.

screen shot 2015-08-11 at 4 15 49 pm

Thanks for your demo @awsp after scrolling first column shrinks a little (1-2px). I'll reopen this issue.

Any resolution of this?

@nischalsource as long as one of our programmers will start to work on this case it'll be given a new status (label).

+1

Is there a workaround?

Here's a workaround that worked for me:

tr:not(:last-child) {
    border-bottom: none;
}
tr:first-child td {
    border-top: none; /* causes top border of blue selection box to be under header */
}
tr:first-child th {
    border-bottom-width: 1px !important;
}

hi @sbichenko . I have tried with that but no change.still same problem for me.
screenshot

+1 on this issue, but with a key difference: the misalignment only occurs when using the "checkbox" type of cell. When using just numbers or text, the alignment is perfect. I just upgraded to version 0.24.3.

It seems different browsers render this bug differently too. When using Chrome, the misalignment is only 1px across the board, so not too noticeable even as you go down many rows. However, on Firefox or IE11, the difference keeps growing pixel by pixel, as on the examples others have posted above.

I tried the workaround suggested by @sbichenko, but unfortunately that didn't work either.

@AMBudnik could you put here a demo where it is still reproducible? I couldn't track down the bug in the 0.25.1 version.

@krzysztofspilka guess it's working fine now.

I've tested a version with/without: height/width settings, very long text, fixedColumnsLeft and the checkbox as @thanpolas suggested, full demo: http://jsfiddle.net/x3xzd7u2/

Why don't u add an option for header? It's maybe easier to fix this bug.
If I set columnHeaderHeight to 40px, the table looks like:
image
The row header & column header are neither center & middle. But it will works if I add class htCenter & htMiddle in THs.
Is it a solution? Thanks!

I think that the issue can be closed as I wasn't able to replicate any of the listed behaviors.
Thanks for sharing demos and feedback.

yes, I was one of the original sufferers from this error. It stopped being a problem for us. However I cant remember how we solved this error.

thank you from your feedback @nischalsource
if anything similar would appear just give me a hint.

I was having the same issue and managed to fix it by setting a larger value to the rowHeights property or turning it off completely. In my case changing from 20 to 25 fixed the misalignment. Maybe this solution will work for you aswell.

I have this problem too!

I fixed the first two columns (fixedColumnsLeft: 2) and the first contains pictures that can vary in height.

The misalignment varies when I scroll vertically.

image

Hi @ottosson

have you tried adding the image inside a fixed height/width container or adding autoRowSize to the settings?

@AMBudnik, containing the image in a fixed size div solved the problem!

Thanks a lot!

you're welcome @ottosson

@AMBudnik has a fix for this been released?

@bj00rn the issue has been already solved. If it does not work for you after updating to the latest version please let me know at [email protected]

Was this page helpful?
0 / 5 - 0 ratings