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

x/pkgsite: Can't scroll down #47450

Closed
elie-g opened this issue Jul 28, 2021 · 16 comments
Closed

x/pkgsite: Can't scroll down #47450

elie-g opened this issue Jul 28, 2021 · 16 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite

Comments

@elie-g
Copy link

elie-g commented Jul 28, 2021

What is the URL of the page with the issue?

Any page of the website.

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.40 Safari/537.36

Screenshot

recorded-2021-07-28T18 45 56

What did you do?

Nothing?!

What did you expect to see?

The page scrolling down normally.

What did you see instead?

It keeps scrolling back to the top. I can't scroll down.

I tried to clear the page data (cookies, storage, etc.) and hard reload the page but it didn't fix the issue.

@gopherbot gopherbot added this to the Unreleased milestone Jul 28, 2021
@elie-g
Copy link
Author

elie-g commented Jul 28, 2021

I noticed it happens only when the window width is >= 1280 px.

@cespare
Copy link
Contributor

cespare commented Jul 29, 2021

Does the problem happen in an incognito window?

@elie-g
Copy link
Author

elie-g commented Jul 29, 2021

@cespare Yes it still does.

@jba jba added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 29, 2021
@jba jba modified the milestones: Unreleased, pkgsite/frontend Jul 29, 2021
@jamalc
Copy link

jamalc commented Jul 29, 2021

I can't reproduce this in Chrome/92.0.4515.107 on Debian Linux. What flavor of Linux are you running? Are you able to update Chrome to see if that solves the issue?

@elie-g
Copy link
Author

elie-g commented Jul 29, 2021

I just updated to the latest version of Chrome (92.0.4515.107) but I still have the same issue.

I'm on Ubuntu 20.10 (Groovy).

@jamalc
Copy link

jamalc commented Jul 29, 2021

I can't reproduce in Chrome 92.0.4515.107 on Ubuntu 20.10 either. I have few more ideas if you have the time:

  • Does it happen in other web browsers on your system?
  • Does it happen if you disable JavaScript?
  • Are there any console errors after scrolling or when the page loads?
  • Do you have more than one input device connected, for example both a mouse and trackpad?
  • Can you think of any Chrome extensions you have installed that might contribute to issue?

My best guess is that the code that handles scrolling nav items into view has a sneaky bug somewhere on pkgsite or in the actual Element.scrollIntoView() Web API.

@oandrew
Copy link

oandrew commented Jul 29, 2021

I'm seeing the same issue on macOS 11.4 + Chrome 92.0.4515.107 .

  • Does it happen in other web browsers on your system?

No issues with Safari or Firefox.

Doesn't happen with JavaScript disabled.

  • Are there any console errors after scrolling or when the page loads?

No console errors.

  • Do you have more than one input device connected, for example both a mouse and trackpad?

External mouse/keyboard, but disconnecting them does not change anything. It happens when scrolling with keyboard (arrows or home/end) as well

  • Can you think of any Chrome extensions you have installed that might contribute to issue?

It is happening even with --disable-extensions

Also, as mentioned above, it happens only when browser window is >=1280px wide.

@jamalc
Copy link

jamalc commented Jul 30, 2021

@oandrew would you mind also trying in an incognito window?

@gopherbot
Copy link

Change https://golang.org/cl/338589 mentions this issue: static/{frontend,shared}: replace scrollIntoViewIfNeeded with scrollIntoView

@jamalc
Copy link

jamalc commented Jul 30, 2021

Let's try CL 338589 as a potential fix next after our next deploy on Monday.

gopherbot pushed a commit to golang/pkgsite that referenced this issue Jul 30, 2021
The scrollIntoViewIfNeeded API is non-standard and potentially
causing scroll issues for some visitors in Chrome. The behavior
of scrollIntoView is virtually identical with the options
`behavior: 'smooth', block: 'nearest'`.

For golang/go#47450

Change-Id: I8712461b1a2ff7666bf6e7ec20a690bf4c108378
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/338589
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
@zhangyoufu
Copy link
Contributor

Still running into this issue. macOS + Chrome M92.

Single stepped to the following code:

  private observeTargets() {
    this.addObserver(treeitem => {
      this.expandTreeitem(treeitem);
      this.setSelected(treeitem);
      treeitem.el.scrollIntoView({ block: 'nearest' });
    });

@davidwalter0
Copy link

with font size change it doesn't appear to be as much about window size as whether the left panel is visible

When closed as below scrolling is effective
image

With the left panel visible scrolling breaks, which sounds like it corresponds to the scroll code for short cuts as mentioned above

image

@gopherbot
Copy link

Change https://golang.org/cl/339393 mentions this issue: static,tests: temporarily disable scrolling nav items into view

@jamalc
Copy link

jamalc commented Aug 3, 2021

Thanks for the additional context. I'm still unable to reproduce this behavior in Chrome/Safari/Firefox on MacOS or Chrome/Firefox on Ubuntu. We'll disable the feature while we're diagnosing the issue. Please add additional system information (OS, Processor, Input Devices, etc) if you're open to sharing.

@aluchianic
Copy link

same bug for me, but only in Chrome Version 92.0.4515.107 (Official Build) (x86_64) in Opera 77.0.4054.277 works fine. Bug starts when left navigation tab is opened.

Mac Pro (15-inch, 2019)
Macos BigSur 11.2.3
i7/6 core

gopherbot pushed a commit to golang/pkgsite that referenced this issue Aug 3, 2021
Disabling scroll into view while we investigate a
bug report.

For golang/go#47450

Change-Id: Ia2de6419ddc1deca18a8dbcaa0d065773e6bec4c
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/339393
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
@jamalc
Copy link

jamalc commented Jan 12, 2022

Without consistent support for scrollIntoView across all browsers I think the solution for is to leave it disabled. I haven't seen any issues around the current behavior without scrollIntoView so I'll close this issue.

@jamalc jamalc closed this as completed Jan 12, 2022
@hyangah hyangah added the pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development label May 20, 2022
@rsc rsc unassigned jamalc Jun 23, 2022
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite
Projects
None yet
Development

No branches or pull requests

10 participants