Commit ede33d58 authored by Weilun Shi's avatar Weilun Shi Committed by Commit Bot

[NTP] Double click the collection tile will not apply custom background

Only double click on the "SelectedTile" can apply that as the custom
background. In that case, when we double click on the collection tile
the click count will not apply to the image tile underneath it, so that
it will not apply the underneath custom background.

Bug: 872953
Change-Id: I897be7aa93040e1e819ceb762e4d4c78f9f0b1ce
Reviewed-on: https://chromium-review.googlesource.com/1170134
Commit-Queue: Weilun Shi <sweilun@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582242}
parent 601da7ee
...@@ -645,10 +645,10 @@ customBackgrounds.showImageSelectionDialog = function(dialogTitle) { ...@@ -645,10 +645,10 @@ customBackgrounds.showImageSelectionDialog = function(dialogTitle) {
let clickCount = event.detail; let clickCount = event.detail;
if (clickCount == 1) { if (clickCount == 1) {
tileInteraction(event); tileInteraction(event);
} else if (clickCount == 2) { } else if (clickCount == 2 && customBackgrounds.selectedTile == this) {
customBackgrounds.setBackground( customBackgrounds.setBackground(this.dataset.url,
this.dataset.url, this.dataset.attributionLine1, this.dataset.attributionLine1, this.dataset.attributionLine2,
this.dataset.attributionLine2, this.dataset.attributionActionUrl); this.dataset.attributionActionUrl);
} }
}; };
tile.onkeyup = function(event) { tile.onkeyup = function(event) {
......
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