IndexedDb viewer in console behaves strangely with an entry with a blank key
Categories
(DevTools :: Storage Inspector, defect, P3)
Tracking
(Not tracked)
People
(Reporter: adamson.g, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Steps to reproduce:
I created an indexed db and inserted some values with keys, and one with a blank key.
Actual results:
Clicking on the entry with the blank key did not select it
If I clicked on an entry with a key, then the one with the blank key, then another entry with a valid key, I would have multiple keys selected.
Expected results:
The entry with the blank key should have been selected.
Comment 1•4 years ago
|
||
Hi adamson.g,
Can you please share with a screen recording or more detailed steps to reproduce this? Not particularly familiar with creating indexdDb and what to inspect in Storage Inspector.
Also moving this to a component so developers can check it out but if you have the time, please elaborate a bit on the steps and how to do this, it is greatly appreciated. Not 100% sure if this is an indexedDB issue or DevTools unless I understand the steps better.
Thank you
Comment 2•4 years ago
|
||
AFAIU, this is a DevTools UI issue.
Here is the video, closing and reopening the dev tools is necessary to pick up the new db created by the code I used (stripped down version of the TutorialsPoint example)
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Thanks :adamson.g for the code and the video, it helps a lot!
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Thanks for the report!
I could easily reproduce the problem given the test case on my machine (Win 10, Nightly)
The problem is that the data-table widget [1] is using the key (value in the Key column) to identify the selected row, see [2]. And when the user clicks on a row with no key, the code is executed and the click handler bails out.
https://searchfox.org/mozilla-central/rev/dbced93f1c57942501c23d4633d01ce59d9087a1/devtools/client/storage/ui.js#996-997
It looks like we should provide different data to uniquely identify the row.
[1] https://searchfox.org/mozilla-central/rev/dbced93f1c57942501c23d4633d01ce59d9087a1/devtools/client/shared/widgets/TableWidget.js
[2] https://searchfox.org/mozilla-central/rev/dbced93f1c57942501c23d4633d01ce59d9087a1/devtools/client/shared/widgets/TableWidget.js#158-180
Honza
Comment 6•4 years ago
|
||
Btw. I am using this online test case
http://janodvarko.cz/tests/fission/case2/index.html
Honza
Comment 7•4 years ago
|
||
The bug fix in bug 1613356 also covers this. So I mark this as a duplicate.
Sebastian
Description
•