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

Investigate undesirable auto-scrolling behavior #24171

Closed
astone123 opened this issue Oct 7, 2022 · 3 comments · Fixed by #26102
Closed

Investigate undesirable auto-scrolling behavior #24171

astone123 opened this issue Oct 7, 2022 · 3 comments · Fixed by #26102
Labels
type: bug type: regression A bug that didn't appear until a specific Cy version release v10.0.0 🐛 Issue present since 10.0.0

Comments

@astone123
Copy link
Contributor

astone123 commented Oct 7, 2022

Users are reporting that the command log stops auto-scrolling during test execution unexpectedly. We haven't been able to reproduce this issue reliably, so it has been difficult to investigate. The goal of this issue should be to come up with a way to reliably reproduce the issue and/or document how we might fix it.

Related issues:
#16098
#24015

The command log shouldn't stop auto scrolling during test execution unless it is supposed to (like a user scrolls up in the command log)

@marktnoonan suggested a way to look into this here

I wonder if we could act on this by adding some more guards around what is considered "user scrolling". The root cause of this seems to be that in certain situations, elements being added to the command log, and cypress autoscrolling, get interpreted as user scrolling. A user taking control by scrolling the command log to look at something while a test is running makes sense intuitively and I think it would be really disruptive (to a greater number of users) to change that behavior.

To tighten this up though, after user:scroll:detected we could check if the pointer is over the scroll container in the command log. If it's not, the user most like was not intending to scroll the command log. Keyboard scrolling is unlikely since the Application Under Test almost always grabs keyboard focus.

So we could skip temporarilyDisableAutoScrolling using that or some similar rubric, and only do it when we have extra signals that the user actually triggered the scroll event.

@egucciar
Copy link
Contributor

egucciar commented Nov 8, 2022

Experiencing this issue in the cypress experimental studio without me having scrolled at all. Just open a new studio, pick a spec, and it does not scroll :(

Editted to add gif

2022-11-08 15-29-55 2022-11-08 15_31_51

@emilyrohrbough emilyrohrbough added type: bug type: regression A bug that didn't appear until a specific Cy version release v10.0.0 🐛 Issue present since 10.0.0 labels Mar 13, 2023
@emilyrohrbough
Copy link
Member

@AtofStryker & I have identified the (or one) cause for the Autoscrolling bug. If you scroll & click on a command while tests are running, autoscroll is disabled for the user. The only way to re-enable it is to know you have to turn it back on in the preferences.

  1. Autoscroll should always reset to the user’s preferences on test restart/refresh - the user preferences should not be updated magically. This should only be changed/set by the user.
  2. @AtofStryker (and prob many users) was not aware that Autoscroll is a user preference that could be toggled at all, so when it was magically disabled, it appears to be completely broken behavior.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 15, 2023

Released in 12.8.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.8.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 15, 2023
@AtofStryker AtofStryker removed their assignment Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug type: regression A bug that didn't appear until a specific Cy version release v10.0.0 🐛 Issue present since 10.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants