use clientWidth instead of getBoundingClientRect
This commit is contained in:
parent
5022df9192
commit
4fb3d7169f
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user