Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 2297663008: MD Settings: Prevent unexpected scrolling to section on popstates. (Closed)

Created:
4 years, 3 months ago by tommycli
Modified:
4 years, 3 months ago
Reviewers:
michaelpg
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: Prevent unexpected scrolling to section on popstates. On subpage-backs or Browser back buttons, prevent the MainPageBehavior from scrolling to the position of the last routes' section. This makes section routes behave more like #anchorLinks. BUG=640523 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/776eb73066021f12a815c669c73c4db433751d15 Cr-Commit-Position: refs/heads/master@{#416386}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix #

Patch Set 3 : add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -44 lines) Patch
M chrome/browser/resources/settings/route.js View 1 6 chunks +14 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/main_page_behavior.js View 1 2 chunks +3 lines, -9 lines 0 comments Download
M chrome/test/data/webui/settings/route_tests.js View 1 2 3 chunks +54 lines, -32 lines 0 comments Download

Messages

Total messages: 22 (14 generated)
tommycli
michaelpg: PTAL, thanks!
4 years, 3 months ago (2016-09-01 22:39:17 UTC) #7
michaelpg
https://codereview.chromium.org/2297663008/diff/1/chrome/browser/resources/settings/settings_page/main_page_behavior.js File chrome/browser/resources/settings/settings_page/main_page_behavior.js (right): https://codereview.chromium.org/2297663008/diff/1/chrome/browser/resources/settings/settings_page/main_page_behavior.js#newcode107 chrome/browser/resources/settings/settings_page/main_page_behavior.js:107: promise.then(this.tryTransitionToSection_.bind(this, isPopstate)); tryTransitionToSection transitions to whatever the current route ...
4 years, 3 months ago (2016-09-02 19:37:42 UTC) #10
tommycli
michaelpg: thanks! https://codereview.chromium.org/2297663008/diff/1/chrome/browser/resources/settings/settings_page/main_page_behavior.js File chrome/browser/resources/settings/settings_page/main_page_behavior.js (right): https://codereview.chromium.org/2297663008/diff/1/chrome/browser/resources/settings/settings_page/main_page_behavior.js#newcode107 chrome/browser/resources/settings/settings_page/main_page_behavior.js:107: promise.then(this.tryTransitionToSection_.bind(this, isPopstate)); On 2016/09/02 19:37:42, michaelpg wrote: ...
4 years, 3 months ago (2016-09-02 20:53:43 UTC) #11
michaelpg
nice, lgtm but a test for the popstate bool would be nice
4 years, 3 months ago (2016-09-02 21:20:48 UTC) #12
tommycli
hi, I added a test thanks!
4 years, 3 months ago (2016-09-02 22:17:43 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2297663008/40001
4 years, 3 months ago (2016-09-02 23:27:38 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-02 23:34:23 UTC) #20
commit-bot: I haz the power
4 years, 3 months ago (2016-09-02 23:35:59 UTC) #22
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/776eb73066021f12a815c669c73c4db433751d15
Cr-Commit-Position: refs/heads/master@{#416386}

Powered by Google App Engine
This is Rietveld 408576698