Commit 17554c1b authored by James Cook's avatar James Cook Committed by Commit Bot

Fix OS accessibility settings link to browser appearance settings

When SplitSettings is enabled the route to APPEARANCE doesn't exist,
so clicking the link throws an error. Instead, open the browser setting
in a new browser tab.

Test: Open OS settings > Advanced > Accessibility > Manage
accessibility features, click "Open appearance settings"

Bug: 999354
Change-Id: Ibb1e42dccfef72a42779c330ba189061e398da4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1778815Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692176}
parent d692200c
......@@ -212,9 +212,16 @@ Polymer({
/** @private */
onAppearanceTap_: function() {
settings.navigateTo(
settings.routes.APPEARANCE,
/* dynamicParams */ null, /* removeSearch */ true);
if (loadTimeData.getBoolean('isOSSettings')) {
// Open browser appearance section in a new browser tab.
window.open('chrome://settings/appearance');
} else {
// Open browser appearance in this settings window.
// TODO(crbug.com/986596): Remove this when SplitSettings is the default.
settings.navigateTo(
settings.routes.APPEARANCE,
/* dynamicParams */ null, /* removeSearch */ true);
}
},
/** @private */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment