Closed Bug 1625209 Opened 4 years ago Closed 4 years ago

After reloading the page markupview keyboard shortcuts throw errors

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

Attachments

(1 file)

What were you doing?

Please tell us what site you were on, and what steps led to the error you are reporting

  1. Open the inspector
  2. Reload the page
  3. Use any keyboard shortcut in the markup view (eg, UP/DOWN etc...

What happened?

The following error is logged:

console.error: (new TypeError("can't access property \"createTreeWalker\", this.doc is null", "resource://devtools/client/inspector/markup/markup.js", 1017))
TypeError: can't access property "createTreeWalker", this.doc is null: _selectionWalker@resource://devtools/client/inspector/markup/markup.js:1017:20
Down@resource://devtools/client/inspector/markup/markup.js:176:33
_onShortcut@resource://devtools/client/inspector/markup/markup.js:1178:36
_initShortcuts/</<@resource://devtools/client/inspector/markup/markup.js:1165:39
_emit@resource://devtools/shared/event-emitter.js:226:34
emit@resource://devtools/shared/event-emitter.js:172:18
emit@resource://devtools/shared/event-emitter.js:324:18
handleEvent@resource://devtools/client/shared/key-shortcuts.js:282:27

What should have happened?

No error should be logged

Anything else we should know?

The errors come from the previous MarkupView instance. For each navigation/reload, the markup view is destroyed and recreated. When destroying the MarkupView, its Shortcuts object should also be destroyed.

Spotted while working on Bug 1611096.

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0248631210d2
Remove keyboard shortcuts when destroying the DevTools MarkupView r=rcaliman
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76
QA Whiteboard: [qa-76b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: