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

Open
elie-g opened this issue Jul 28, 2021 · 15 comments
Open

x/pkgsite: Can't scroll down #47450

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

Comments

@elie-g
Copy link

@elie-g 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 elie-g commented Jul 28, 2021

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

@cespare
Copy link
Contributor

@cespare cespare commented Jul 29, 2021

Does the problem happen in an incognito window?

@elie-g
Copy link
Author

@elie-g elie-g commented Jul 29, 2021

@cespare Yes it still does.

@jba jba removed this from the Unreleased milestone Jul 29, 2021
@jba jba added this to the pkgsite/frontend milestone Jul 29, 2021
@jamalc
Copy link

@jamalc 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 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 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 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 jamalc commented Jul 30, 2021

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

@gopherbot
Copy link

@gopherbot gopherbot commented Jul 30, 2021

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

@jamalc
Copy link

@jamalc 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

@zhangyoufu zhangyoufu commented Aug 3, 2021

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

@davidwalter0 davidwalter0 commented Aug 3, 2021

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

@gopherbot gopherbot commented Aug 3, 2021

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

@jamalc
Copy link

@jamalc 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

@aluchianic aluchianic commented Aug 3, 2021

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants