Closed Bug 1198327 Opened 9 years ago Closed 9 years ago

[Rule View] Adding new unmatched rule does not go to new property editor

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
Firefox 43
Tracking Status
firefox43 --- fixed

People

(Reporter: gl, Assigned: gl)

Details

Attachments

(1 file, 1 obsolete file)

STR:
1. Add an unmatched rule, finish editing the selector and enter
2. Notice a new property editor is not created

Expected:
A new property editor should be created
Assignee: nobody → gabriel.luong
Status: NEW → ASSIGNED
Comment on attachment 8655087 [details] [diff] [review]
1198327.patch

Review of attachment 8655087 [details] [diff] [review]:
-----------------------------------------------------------------

Let's discuss further if you don't like the suggestion

::: browser/devtools/styleinspector/rule-view.js
@@ +2871,5 @@
>            ruleView.highlightedSelector === this.rule.selectorText) {
>          ruleView.toggleSelectorHighlighter(ruleView.lastSelectorIcon,
>            ruleView.highlightedSelector);
>        }
> +      this._moveSelectorFocus(editor, direction);

Could you instead change this line to editor._moveSelectorFocus(newRule, direction) and not make any changes to _moveSelectorFocus?

It looks like that would have the same effect, but then _moveSelectorFocus could keep the more straightforward interface.  In fact, it seems like the Rule argument in _moveSelectorFocus could be removed and could be accessed via this.rule (which would be newRule if you called it on editor in this scope).
Attachment #8655087 - Flags: review?(bgrinstead)
Attachment #8655087 - Attachment is obsolete: true
Attachment #8656105 - Flags: review?(bgrinstead)
Attachment #8656105 - Flags: review?(bgrinstead) → review+
Keywords: checkin-needed
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: