show() in src/popup/views/exportPrivkey.js found the address line as the parent of #export-privkey-dot, then replaced the line's contents with renderAddressHtml(), which deleted #export-privkey-dot. The next open in the same popup session threw before it navigated.
The address line's div in src/popup/index.html now carries the export-privkey-address id itself, and show() looks it up by that id. That id used to sit on a placeholder span inside the line; both placeholder spans are gone, since the first open always replaced them.
Other views that call renderAddressHtml(): none finds its container through a child, so no other view changed.
Tests:
tests/exportPrivkey.test.js: the DOM stub now takes an element out of the document when its parent's contents are replaced, as a browser does. A new test opens the screen, goes Back, and opens it for another address. Against current next it fails with the error from the issue, and so does the existing "never writes it after the screen is re-entered" test, which already opened the screen twice but was hidden by the old stub.
tests/e2e/run.js: the #253 case "leaving while the decrypt is in flight reveals no private key" no longer reopens the popup before its second open.
Fixes https://git.eeqj.de/sneak/AutistMask/issues/460.
`show()` in `src/popup/views/exportPrivkey.js` found the address line as the parent of `#export-privkey-dot`, then replaced the line's contents with `renderAddressHtml()`, which deleted `#export-privkey-dot`. The next open in the same popup session threw before it navigated.
The address line's `div` in `src/popup/index.html` now carries the `export-privkey-address` id itself, and `show()` looks it up by that id. That id used to sit on a placeholder span inside the line; both placeholder spans are gone, since the first open always replaced them.
Other views that call `renderAddressHtml()`: none finds its container through a child, so no other view changed.
Tests:
- `tests/exportPrivkey.test.js`: the DOM stub now takes an element out of the document when its parent's contents are replaced, as a browser does. A new test opens the screen, goes Back, and opens it for another address. Against current `next` it fails with the error from the issue, and so does the existing "never writes it after the screen is re-entered" test, which already opened the screen twice but was hidden by the old stub.
- `tests/e2e/run.js`: the `#253` case "leaving while the decrypt is in flight reveals no private key" no longer reopens the popup before its second open.
The Back-stack behaviour of https://git.eeqj.de/sneak/AutistMask/issues/461 is untouched.
Model: opus-5-5
show() found the address line through the element inside it, then
replaced the line's contents with renderAddressHtml(), which deleted
that element, so the next show() in the same popup session threw
before it navigated. The line now carries the export-privkey-address
id itself and is looked up by it. No other view that renders an
address finds its container through a child.
The jest DOM stub now takes an element out of the document when its
parent's contents are replaced, and a new test opens the screen
twice. The #253 e2e case no longer reopens the popup before its
second open.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #460.
show()insrc/popup/views/exportPrivkey.jsfound the address line as the parent of#export-privkey-dot, then replaced the line's contents withrenderAddressHtml(), which deleted#export-privkey-dot. The next open in the same popup session threw before it navigated.The address line's
divinsrc/popup/index.htmlnow carries theexport-privkey-addressid itself, andshow()looks it up by that id. That id used to sit on a placeholder span inside the line; both placeholder spans are gone, since the first open always replaced them.Other views that call
renderAddressHtml(): none finds its container through a child, so no other view changed.Tests:
tests/exportPrivkey.test.js: the DOM stub now takes an element out of the document when its parent's contents are replaced, as a browser does. A new test opens the screen, goes Back, and opens it for another address. Against currentnextit fails with the error from the issue, and so does the existing "never writes it after the screen is re-entered" test, which already opened the screen twice but was hidden by the old stub.tests/e2e/run.js: the#253case "leaving while the decrypt is in flight reveals no private key" no longer reopens the popup before its second open.The Back-stack behaviour of #461 is untouched.
Model: opus-5-5
PASS
Model: opus-5-5