Closed Bug 1741603 Opened 2 years ago Closed 2 years ago

Uncaught TypeError: this._view.parentElement is undefined errors in browser console when selecting Show in Folder context menu option from App Menu-> Bookmarks


(Firefox :: Bookmarks & History, defect, P3)




100 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox94 --- unaffected
firefox95 --- wontfix
firefox96 --- wontfix
firefox100 --- verified


(Reporter: atrif, Assigned: lebar)




(3 files)

Attached image bookmark_00.gif

Affected versions

  • 96.0a1 (20211116212601)
  • 95.0b8 (20211116185800)

Affected platforms

  • macOS 10.15
  • Windows 10x64
  • Ubuntu 16.04

Steps to reproduce

  1. Open Firefox browser console.
  2. Open App Menu-> Bookmarks and r-click on a random bookmark.
  3. 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.


  • Attached a screen recording.
Has STR: --- → yes

I think that the problem is with buildContextMenu in controller.js ( 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 ||

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.

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.

Priority: -- → P3
Depends on: 469441
See Also: 469441
Assignee: nobody → lebar
Pushed by
Fix Show in Folder context menu item in app menu to open in sidebar. r=Standard8
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Regressions: 1759751
Flags: qe-verify+

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.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.