New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 644583 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

Settings page scrolls to incorrect location after tapping a section in the nav menu

Project Member Reported by michae...@chromium.org, Sep 7 2016

Issue description

Version: 55.0.2853.0

1. Browser window taller than the Basic/initial settings page
2. go to chrome://md-settings
3. hamburger menu => Appearance. Doesn't scroll!
4. hamburger menu => Search Engine. Scrolls to Appearance!

In general, navigating to a lower section will scroll to the previous section navigation. Scrolling to the correct section requires clicking the section in the hamburger menu two times. Whereas, navigating to a higher section WAI.
 
Owner: michae...@chromium.org
Status: Started (was: Available)
looks like the overscroll only grows after MainPageBehavior attempts to scroll to the new section. Likely caused by https://codereview.chromium.org/2230123002 where doWhenReady() was updated to call its callback *immediately* if the test succeeds.
Cc: dbeam@chromium.org
sigh. Making the async sync seems to work. But who knows. https://codereview.chromium.org/2312423003/

Ultimately the most correctest fix would be to combine the Basic and Advanced pages into one page, and meld main_page_behavior.js into <settings-main>. Then only one page would ever be shown at a given time, and only one element would be
responsible for transitions/scrolling/overscroll padding. But that is a fair amount of work.
A similar issue is using the nav menu to go from a subpage to a section on the same page:

0. chrome://md-settings (with Advanced not expanded)
1. open a subpage on the Basic page
2. open the nav menu and On Startup

Scrolls to bottom, with no overscroll, so On Startup is not the top section.

Similarly, opening an Advanced subpage and using the nav menu to go to an Advanced section, e.g. Reset, has no overscroll, so Reset is not the top section.
Cc: nyerramilli@chromium.org ranjitkan@chromium.org michae...@chromium.org
 Issue 641238  has been merged into this issue.

Comment 5 by dbeam@chromium.org, Sep 27 2016

what's the status on this?  it's blocking the desktop md-settings dev launch
The CL I put up a few weeks ago doesn't work. I'm working on an event-based CL that is promising (AFAIK everything actually works right now), so I'll rebase, test and upload tomorrow if everything checks out.

But I make no guarantees that overscrolling won't break again... we can test this, but I make no guarantees said tests wouldn't have false positives or false negatives.... it's really a frustrating feature to develop and test, and when it breaks it breaks worse than just not having overscroll at all (like scrolling to the wrong section because we're using a stale overscroll value!).

Comment 7 by dbeam@chromium.org, Sep 28 2016

Blocking: -630505
Project Member

Comment 8 by bugdroid1@chromium.org, Oct 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a12c6d364a12f51c18854c0b16bae824a55c88e

commit 4a12c6d364a12f51c18854c0b16bae824a55c88e
Author: michaelpg <michaelpg@chromium.org>
Date: Mon Oct 03 22:31:13 2016

MD Settings: Set overscroll before attempting to scroll to section

Fixes scrolling when tapping an item in the drawer nav menu below the current
scroll position.

https://codereview.chromium.org/2230123002 made MainPageBehavior try scrolling
to a section synchronously, but settings-main updates the overscroll after a
setTimeout. We should be able to update the overscroll synchronously as well --
we originally had issues with tests but hopefully the code is now more robust.

This consolidates toggleScrolling_ into settings-main via the freeze-scroll
event.

Testing is difficult because of timing issues: we have to wait for the page
to be fully 100% loaded before testing scrolling, or sections could change
height and interfere with the test. But we don't have any way of knowing that.

BUG= 644583 
R=dschuyler@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2312423003
Cr-Commit-Position: refs/heads/master@{#422569}

[modify] https://crrev.com/4a12c6d364a12f51c18854c0b16bae824a55c88e/chrome/browser/resources/settings/settings_main/settings_main.html
[modify] https://crrev.com/4a12c6d364a12f51c18854c0b16bae824a55c88e/chrome/browser/resources/settings/settings_main/settings_main.js
[modify] https://crrev.com/4a12c6d364a12f51c18854c0b16bae824a55c88e/chrome/browser/resources/settings/settings_page/main_page_behavior.js

Status: Fixed (was: Started)

Sign in to add a comment