Add extensive debugging for suggestion clicks
This commit is contained in:
@@ -619,6 +619,8 @@
|
|||||||
|
|
||||||
const sorted = Object.entries(scores).sort((a, b) => b[1] - a[1]).slice(0, 3);
|
const sorted = Object.entries(scores).sort((a, b) => b[1] - a[1]).slice(0, 3);
|
||||||
|
|
||||||
|
console.log('updateSuggestions called, sorted:', sorted);
|
||||||
|
|
||||||
if (sorted.length === 0) {
|
if (sorted.length === 0) {
|
||||||
list.innerHTML = '<p style="color:var(--text-secondary);font-size:13px;">No synergy data available for selected operators. Try adding a main DPS like Laevatain or Yvonne.</p>';
|
list.innerHTML = '<p style="color:var(--text-secondary);font-size:13px;">No synergy data available for selected operators. Try adding a main DPS like Laevatain or Yvonne.</p>';
|
||||||
} else {
|
} else {
|
||||||
@@ -644,9 +646,13 @@
|
|||||||
`;
|
`;
|
||||||
}).join('');
|
}).join('');
|
||||||
|
|
||||||
|
console.log('Suggestions HTML set, list.children:', list.children.length);
|
||||||
|
|
||||||
// Add click listeners to suggestion items using event delegation
|
// Add click listeners to suggestion items using event delegation
|
||||||
list.onclick = function(e) {
|
list.onclick = function(e) {
|
||||||
|
console.log('list clicked, target:', e.target);
|
||||||
const item = e.target.closest('.suggestion-item');
|
const item = e.target.closest('.suggestion-item');
|
||||||
|
console.log('closest item:', item);
|
||||||
if (item) {
|
if (item) {
|
||||||
const operatorId = item.dataset.operatorId;
|
const operatorId = item.dataset.operatorId;
|
||||||
console.log('Clicked suggestion:', operatorId);
|
console.log('Clicked suggestion:', operatorId);
|
||||||
|
|||||||
Reference in New Issue
Block a user