SwipeView icon indicating copy to clipboard operation
SwipeView copied to clipboard

Wrapper width is not always calculated exactly right (down to the decimals)

Open generator85 opened this issue 12 years ago • 3 comments

In firefox I was having issues if the width of the wrapper was set as a percentage. Over time the content gets offset if the width of the wrapper is not exactly rounded to the exact pixel.

Wouldn't it be better if the wrapperWidth would be calculated using getBoundingClientRect() instead of clientWidth/clientHeight? getBoundingClientRect() returns the width in sub-pixel precision. It seems to have fixed my problem.

generator85 avatar Oct 30 '12 16:10 generator85

interesting, thanks for the report. I'll check it out.

cubiq avatar Oct 30 '12 16:10 cubiq

This seems to work in most browsers, except for the Windows version of Chrome.

P.S: Sorry for closing and opening the issue, I accidentally pressed the button

generator85 avatar Dec 05 '12 09:12 generator85

same problem here for Mac version of Chrome. very noticeable offsetting

hungkienluu avatar Feb 01 '13 18:02 hungkienluu