Closed Bug 1466816 Opened 6 years ago Closed 6 years ago

Font editor: Selected rule does not exist in 2-pane mode

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox63 verified, firefox64 verified)

VERIFIED FIXED
Firefox 63
Tracking Status
firefox63 --- verified
firefox64 --- verified

People

(Reporter: rcaliman, Assigned: rcaliman)

References

Details

Attachments

(2 files)

Steps to reproduce:

- Set DevTools Inspector in 2-pane mode
- Select the Fonts panel
- Close DevTools (this ensures that on re-open, Fonts is the default panel)
- Re-open DevTools and pich an element in the inspector
- Adjust toggles in the Fonts panel

Expected
- Changes are written to inline style

Result:
- No changes are written. There's an error in the toolbox:
TypeError: this.selectedRule is undefined

This happens because the Rule view was never instantiated (The Fonts panel was the default one to load). The rules from the Rule view don't yet exist.
Product: Firefox → DevTools
The Font Editor should rely on Element Style instead of Rule view to read and write properties.
Assignee: nobody → rcaliman
Status: NEW → ASSIGNED
Priority: P4 → P2
ElementStyle depends on the existence of Rule view. One solution is to force an instantiation of the Rule view even though it may not be visible.
Comment on attachment 8988281 [details]
Bug 1466816 - Ensure rule models are available to the font editor even if the Rule view is not visible.

https://reviewboard.mozilla.org/r/253540/#review260166
Attachment #8988281 - Flags: review?(gl) → review+
Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f76ef88d7e26
Ensure rule models are available to the font editor even if the Rule view is not visible. r=gl
https://hg.mozilla.org/mozilla-central/rev/f76ef88d7e26
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Flags: qe-verify+
QA Contact: catalin.sasca
Attached image TypeError.png
I successfully reproduced the issue on Firefox Nightly 62.0a1 (2018-06-05) under Windows 10 (x64) using the STR from Comment 0.
The issue is verified fixed on Firefox Beta 63.0b13 under Windows 10 (x64), Ubuntu 16.04 (x64) and macOS 10.13.

The issue is reproducing on latest Firefox Nightly 64.0a1 (2018-10-09) under all three os-es mentioned above, and the error thrown in the browser console is "TypeError: this.selectedRule is undefined; can't access its "createProperty" property". I'll upload an attachment with the errors.
Hi Razvan, can you take a look over this ?
Flags: needinfo?(rcaliman)
This regression is tracked (and will be fixed) in Bug 1497950.
Flags: needinfo?(rcaliman)
Depends on: 1497950
This issue was verified fixed, by bug 1497950.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Component: Inspector: Fonts → Inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: