summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/shared')
-rw-r--r--devtools/client/shared/widgets/TableWidget.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/devtools/client/shared/widgets/TableWidget.js b/devtools/client/shared/widgets/TableWidget.js
index a0f0dfc11..57d2914d5 100644
--- a/devtools/client/shared/widgets/TableWidget.js
+++ b/devtools/client/shared/widgets/TableWidget.js
@@ -463,7 +463,14 @@ TableWidget.prototype = {
return;
}
- let selectedCell = this.tbody.querySelector(".theme-selected");
+ // We need to get the first *visible* selected cell. Some columns are hidden
+ // e.g. because they contain a unique compound key for cookies that is never
+ // displayed in the UI. To do this we get all selected cells and filter out
+ // any that are hidden.
+ let selectedCells = [...this.tbody.querySelectorAll(".theme-selected")]
+ .filter(cell => cell.clientWidth > 0);
+ // Select the first visible selected cell.
+ let selectedCell = selectedCells[0];
if (!selectedCell) {
return;
}