Closed Bug 1213412 Opened 9 years ago Closed 9 years ago

When entering a new rule in the rule view, it is crossed out before a value is entered

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox43 unaffected, firefox44 fixed, firefox45 fixed, b2g-v2.5 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox43 --- unaffected
firefox44 --- fixed
firefox45 --- fixed
b2g-v2.5 --- fixed

People

(Reporter: bgrins, Assigned: tromey)

References

Details

Attachments

(1 file, 2 obsolete files)

STR:
* open data:text/html,hi
* inspect the body element
* in the rule view type "height:"
* expected: there is a new height field on the left and a textbox on the right to enter a value (nothing crossed out)
* actual: the "height" name is crossed out

This is most likely a regression due to as-authored styles.  I'd say any time the value editor is focused we should remove the crossed out style.
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Attachment #8678220 - Flags: review?(bgrinstead)
Comment on attachment 8678220 [details] [diff] [review]
don't override property while editing

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

Nice and simple, fixes the reported problem and I don't see anything wrong with this approach.  Please update commit message to include reviewer
Attachment #8678220 - Flags: review?(bgrinstead) → review+
Attachment #8678220 - Attachment is obsolete: true
Attachment #8678229 - Flags: review+
The revert-on-ESC tests failed here in the try run.
This happens because at the point at which the revert handler is run,
the popup is still open, meaning that the this.editing is true, even
though really editing has finished.

I'm investigating what to do, but I think maybe closing the popup first
will give the best behavior, in the sense of avoiding a dependency
by the rule-view on the internal behavior of the popup.
Salvage the ".editing" approach by arranging for the revert callback
to be called only after the popup is closed.

However, this runs afoul of the editing check in _previewValue, so
also add a "reverting" flag there.
Attachment #8678229 - Attachment is obsolete: true
Comment on attachment 8679599 [details] [diff] [review]
don't override property while editing

A cleaner try run and maybe not too ugly.
Attachment #8679599 - Flags: review?(bgrinstead)
Comment on attachment 8679599 [details] [diff] [review]
don't override property while editing

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

Seems fine
Attachment #8679599 - Flags: review?(bgrinstead) → review+
Keywords: checkin-needed
Comment on attachment 8679599 [details] [diff] [review]
don't override property while editing

Approval Request Comment
[Feature/regressing bug #]:
This fixes a regression introduced by bug 984880.
[User impact if declined]:
When adding a new property in the rule view, it will be marked as
invalid at first, even though it is actively being edited.  This is
confusing to users.
[Describe test coverage new/current, TreeHerder]:
There is a new test covering the new code; plus existing extensive
tests for the code that is being modified.
[Risks and why]: 
Reasonably low, IMO, due to the new test.
[String/UUID change made/needed]: No.
Attachment #8679599 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/cd4361e0be3a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Comment on attachment 8679599 [details] [diff] [review]
don't override property while editing

Given that we added a new test and have existing automated test coverage, approved for uplift to Aurora44.
Attachment #8679599 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: