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({ ...@@ -44,8 +44,10 @@ Polymer({
return; return;
// We do not navigate away if the click was on a link. // 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; return;
}
settings.navigateTo(this.subpageRoute); settings.navigateTo(this.subpageRoute);
}, },
......
...@@ -183,7 +183,13 @@ Polymer({ ...@@ -183,7 +183,13 @@ Polymer({
}, },
/** @private */ /** @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()) if (!this.isHostSet())
return; 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