use clientWidth instead of getBoundingClientRect

This commit is contained in:
Preet 2022-02-21 22:11:50 +05:30
parent 5022df9192
commit 4fb3d7169f

View File

@ -112,7 +112,7 @@ const useHorizontalResize = (
unFocus(document, window);
if (ref.current) {
const width = ref.current.getBoundingClientRect().width;
const width = ref.current.clientWidth;
const current = event.touches[0].clientX;
const positionDelta = position - current;
const widthDelta = inverse ? -positionDelta : positionDelta;