Closed Bug 1536819 Opened 6 months ago Closed 6 months ago

devtools/client/inspector/rules/rules.js:461 - TypeError: node.offsetParent is null

Categories

(DevTools :: Inspector: Rules, defect, P2)

62 Branch
defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: miker, Assigned: miker)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

STR

  1. Open Google.com.
  2. Inspect the Logo.
  3. In the Rule View single click on the body selector (any selector will do).

The following error is logged to the browser console twice:

JavaScript error: resource://devtools/client/inspector/rules/rules.js, line 461: TypeError: node.offsetParent is null

This is because offsetParent is null when a node is set to display:none. We detect this situation and assume that nodeParent has an offsetParent but in this case that node is also display:none so the error is thrown.

This prevents further processing of the rules but currently doesn't cause any undesirable results.

This needs to be fixed in order to fix bug 1514998.

The editing of selectors in the rule view is broken (see https://bugzil.la/1536867) but that is not related to this issue.

Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e72a35251ff8
Fix node.offsetParent is null error in Rule View r=gl
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.