[Track Changes] Newly added invalid declarations (empty values) are being tracked



7 months ago
7 months ago


(Reporter: paul.boiciuc, Unassigned)


65 Branch

Firefox Tracking Flags

(Not tracked)



(2 attachments)



7 months ago
Posted image Capture 1.PNG
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Build ID: 20181106100114


Navigate to about:config and enable the Changes feat. ( devtools.inspector.changes.enabled - True) 


1. Launch Firefox and open the Inspector.
2. Navigate to the 2nd pane and add a property name but do not add a value.
3. Observe the Changes tab.

Rules tab allows the user to add an invalid declaration, having only the property name and not also the value. This issue is carried over to the Changes tab, where the newly added declaration is being tracked.

I have attached a short screenshot for better understanding.

The rules tab does not allow the user to add a declaration without a property name and a value, and the Changes tab does not record the property adding action without a valid format.


7 months ago
Blocks: 1503920
Component: CSS Rules Inspector → Inspector
I'm not sure this should block bug 1503920 but I'll needinfo Razvan to confirm.
The rule-view always worked like this, the Track Changes feature isn't doing anything new here. 
I do think this is a bug of the rule-view, but not something related to Track Changes. To illustrate, compare these 2 behaviors:

- enter a new property name
- press tab
- do not enter a value
- press tab again
==> No new declaration is entered, because the value is missing

- enter a new property name
- press tab
- do not enter a value
- click somewhere outside the value field
==> A new declaration is added, but with no value

I think this is a bug, both scenarios should lead to the same result (i.e. no new declaration added).
Fwiw that's what Chrome does too.

Razvan what do you think?
No longer blocks: 1503920
Component: Inspector → CSS Rules Inspector
Flags: needinfo?(rcaliman)
Priority: -- → P3
In both scenarios we shouldn't track a change. 

In the first case Patrick mentions, the value-less declaration is correctly removed from the Rule view, but it still shows in the Changes panel. That's the behavior I get when using tab navigation.

In the second case Patrick mentions is indeed a Rule view bug which the Changes panel inherits.

For the scope of Track Changes M1, I'd like to aim and fix the issue for the first case.
Flags: needinfo?(rcaliman)
You need to log in before you can comment on or make changes to this bug.