Fix: scrolling on elements being is ignored (#1029)
In certain cases when scrollLeft is being set, but the value doesn't change. Then scrollTop is also ignored, even if that value was changed. In this case we use the `scrollTo` api as it doesn't have that issue.
This commit is contained in:
@@ -1757,8 +1757,11 @@ export class Replayer {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
(target as Element).scrollTop = d.y;
|
(target as Element).scrollTo({
|
||||||
(target as Element).scrollLeft = d.x;
|
top: d.y,
|
||||||
|
left: d.x,
|
||||||
|
behavior: isSync ? 'auto' : 'smooth',
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
/**
|
/**
|
||||||
* Seldomly we may found scroll target was removed before
|
* Seldomly we may found scroll target was removed before
|
||||||
|
|||||||
Reference in New Issue
Block a user