Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reset cursor correctly for body with negative coords #752

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

xrsd
Copy link
Contributor

@xrsd xrsd commented Mar 31, 2023

Что сделано

  • исправляю ошибку при сбросе курсора в нулевую позицию, которая возникает в том случае, если у body после подскролла оказываются отрицательные координаты

@xrsd xrsd requested a review from DudaGod March 31, 2023 17:53
Copy link
Member

@DudaGod DudaGod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@xrsd xrsd merged commit fb36132 into master Apr 6, 2023
@xrsd xrsd deleted the rashid.fix.HERMIONE-147 branch April 6, 2023 10:01
await body.moveTo({ xOffset: 0, yOffset: 0 });

const { x, y } = await body.getLocation();
await body.moveTo({ xOffset: -x, yOffset: -y });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

После этого изменения стала возникать ошибка

  (Session info: chrome=90.0.4430.72)
stack: move target out of bounds: move target out of bounds

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У меня проблему воспроизвести не получается. Нужен minimal reproducible example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants