Vestride / Shuffle

Categorize, sort, and filter a responsive grid of items

Home Page:https://vestride.github.io/Shuffle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Columns miscalculated due to rounding issue

Isaac-Hall opened this issue · comments

Shuffle version
v5.2.2

Describe the bug
For some reason Chrome returns the value of testComputedSize() as 9.99982px instead of 10px, even though box-sizing is calculating the widths of the items properly, which means the padding gets added twice (once by box-sizing including the paddings in the getComputedStyle value, and once by your logic below that in getNumberStyle).

I had a hunch that Chrome is returning the value differently due to screen pixel density, all of my testing suggests otherwise. I have no idea why Chrome is behaving so weirdly. In any case, an easy fix is to change your value var in testComputerSize() function like this:

value = Math.round(getNumber(window.getComputedStyle(e, null).width)) === 10;

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: All Chrome versions after 80

This will most likely solve #306 and #317

Is this project dead? Also where's that value? I'll fix it myself

This project is nearly feature complete. You're welcome to send a PR to fix this if it's actually still an issue.

Dude, I've noticed you acted childish/selfish and delusional quite often when people reported bugs. Downvoting a legit question only confirms that.
People report layout bugs and you just close the issue by saying "I don't see it so closed".

Also, this project was not updated for years and there is nothing "feature complete" on this planet including what you have done.

Ah fuck this I fucking hate devs like you fuck off.

Wow. You are the epitome of why open source sucks.

Shuffle is available to everyone for free, has been taken care of for over 8 years, and still this dude is here saying "How dare your FREE code not be perfectly up to my standards" while providing nothing himself.

Honestly, who hurt you foxnoodles?

Anyway, I couldn't reproduce this bug on my colleagues computer and the only difference I could think of is that I'm running a 1440p screen and he's running a 1080p one, but when I scaled down to 1080p it made no difference. I provided the "fix" in the hopes it would help with discovering what's wrong, but it's a good rule not to go editing scripts without knowing exactly what's going on, so I don't think a pull request makes sense unless people can verify that it is an issue with Shuffle and not with Chrome or some zoom/OS/pixel density situation.

Fixed with #351. Released in v5.4.1.