Commit cc5ac9f3 authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

[NTP] Fix double selection on upload and no background tiles

Bug: 996587
Change-Id: I30894289635cfb232b36394d1a4e861455b86f96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764905
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689744}
parent 22217063
...@@ -402,6 +402,9 @@ customize.clearAttribution = function() { ...@@ -402,6 +402,9 @@ customize.clearAttribution = function() {
}; };
customize.unselectTile = function() { customize.unselectTile = function() {
if (configData.richerPicker) {
return;
}
$(customize.IDS.DONE).disabled = true; $(customize.IDS.DONE).disabled = true;
customize.selectedOptions.background = null; customize.selectedOptions.background = null;
$(customize.IDS.DONE).tabIndex = -1; $(customize.IDS.DONE).tabIndex = -1;
...@@ -969,8 +972,7 @@ customize.richerPicker_selectBackgroundTile = function(tile) { ...@@ -969,8 +972,7 @@ customize.richerPicker_selectBackgroundTile = function(tile) {
return; return;
} }
if (customize.selectedOptions.background && if (tile.parentElement.classList.contains(customize.CLASSES.SELECTED)) {
customize.selectedOptions.background.id == tile.id) {
// If the clicked tile is already selected do nothing. // If the clicked tile is already selected do nothing.
return; return;
} else if (customize.selectedOptions.background) { } else if (customize.selectedOptions.background) {
......
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