Commit af86de0f authored by Jordy Greenblatt's avatar Jordy Greenblatt Committed by Commit Bot

[CrOS MultiDevice] Stop link click from opening subpage in Settings Page

In the HEAD version, a click on the Settings UI 'learn more' link will
route to the subpage when there is a set host (i.e. when waiting for
connection/verification) in addition to the intended behavior of
opening the subpage. This CL just adds a check to the
settings-multidevice-page's click handler that returns before routing
if the click target was a link.

Screenshot: http://screen/ka5Vd3vk1YC

Bug: 881375
Change-Id: I6c1c8e2ed2e6043d2f21442a0ce0b8e211da522e
Reviewed-on: https://chromium-review.googlesource.com/c/1259300Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596394}
parent 4133ebbf
......@@ -44,8 +44,10 @@ Polymer({
return;
// We do not navigate away if the click was on a link.
if (event.path[0].tagName === 'A')
if (event.path[0].tagName === 'A') {
event.stopPropagation();
return;
}
settings.navigateTo(this.subpageRoute);
},
......
......@@ -183,7 +183,13 @@ Polymer({
},
/** @private */
handleItemClick_: function() {
handleItemClick_: function(event) {
// We do not open the subpage if the click was on a link.
if (event.path[0].tagName === 'A') {
event.stopPropagation();
return;
}
if (!this.isHostSet())
return;
......
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