Uncaught TypeError: this._view.parentElement is undefined errors in browser console when selecting Show in Folder context menu option from App Menu-> Bookmarks
Categories
(Firefox :: Bookmarks & History, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr91 | --- | unaffected |
firefox94 | --- | unaffected |
firefox95 | --- | wontfix |
firefox96 | --- | wontfix |
firefox100 | --- | verified |
People
(Reporter: atrif, Assigned: lebar)
References
Details
Attachments
(3 files)
Affected versions
- 96.0a1 (20211116212601)
- 95.0b8 (20211116185800)
Affected platforms
- macOS 10.15
- Windows 10x64
- Ubuntu 16.04
Steps to reproduce
- Open Firefox browser console.
- Open App Menu-> Bookmarks and r-click on a random bookmark.
- Select Show in Folder and observe the browser console.
Expected result
- No errors are displayed. (I don’t know if something else should happen here)
Actual result
- Two errors are displayed inside the browser console.
Regression range
- I don’t think this is a regression. This was added with implementation with bug 469441.
Notes
- Attached a screen recording.
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Updated•3 years ago
|
I think that the problem is with buildContextMenu
in controller.js
(https://searchfox.org/mozilla-central/rev/1e5b6b30d96e9bd7d63eb22bda6f43cf212b5819/browser/components/places/content/controller.js#594-598). The relevant lines are below. This menu item should not even be available in a non-search context. Not sure why it is getting past nodeIsQuery()
let hideIfNotSearch =
item.getAttribute("hide-if-not-search") == "true" &&
(!this._view.selectedNode ||
!this._view.selectedNode.parent ||
!PlacesUtils.nodeIsQuery(this._view.selectedNode.parent));
There are no real side effects to this, though. But the menu item just doesn't make sense in this context. Anyway, I just thought I'd take a preliminary look at it. It's for :mak
to weigh in.
Comment 3•2 years ago
|
||
I think it may actually be useful, as an option. It's true that is not a "search terms" query, but it's still a visualization where there's no folders hierarchy, so a user may be interested into going from this "recent bookmarks" list, to the actual folder containing this bookmark.
So, I'd rather vote to fix the feature, that probably means fixing the view to point to the appropriate Places view object, or fix parentElement for this specific view. Not sure, it should be investigated, but it can be fixed.
Updated•2 years ago
|
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c09df30d2249 Fix Show in Folder context menu item in app menu to open in sidebar. r=Standard8
Comment 6•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 7•2 years ago
|
||
Verified fixed with Firefox 100.0b7 (20220417185951) on Windows 10x64, macOS 10.15 and Ubuntu 21.04. Clicking Show in Folder context menu option inside App Menu > Bookmarks opens the sidebar with the bookmark focused and no errors are displayed inside the browser console.
Description
•