diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-28 16:18:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-28 16:18:19 +0200 |
commit | d295225c19e47c235bf6a0d12c1bcad82fbe6ba9 (patch) | |
tree | 938635ffe5c9ef9225426b5744f5f0e06c26ad4f | |
parent | f090351e69b3539503de181f0e70b3ff561b5bd1 (diff) | |
parent | 5adb87d597407da512dcc7659bbade264ae58425 (diff) | |
download | uxp-d295225c19e47c235bf6a0d12c1bcad82fbe6ba9.tar.gz |
Merge pull request #278 from janekptacijarabaci/devtools_storage_arrow-keys_1
[DevTools] Storage inspector throws an error when use arrow keys
-rw-r--r-- | devtools/client/shared/widgets/TableWidget.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/devtools/client/shared/widgets/TableWidget.js b/devtools/client/shared/widgets/TableWidget.js index a0f0dfc110..57d2914d5a 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; } |