Closed Bug 719916 Opened 8 years ago Closed 8 years ago

style inspector loses focus after entering attribute name

Categories

(DevTools :: Inspector, defect)

Other
Other
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 13

People

(Reporter: kdevel, Assigned: dcamp)

Details

(Whiteboard: [ruleview])

Attachments

(1 file, 2 obsolete files)

User Agent:  

Steps to reproduce:

1. Open a new tab (blank page).
2. Inspect (ctrl-shift-i).
3. Press "Style" Button.
4. Click at closing brace ('}').
5. Enter 'foo'.
6. Press ':'-Key or RETURN-Key.


Actual results:

6. No focus in value field.


Expected results:

6. Focus in the value field.
Confirmed on Mozilla/5.0 (Windows NT 5.1; rv:12.0a1) Gecko/20120120 Firefox/12.0a1 ID:20120120031125
Component: Untriaged → Developer Tools: Inspector
QA Contact: untriaged → developer.tools.inspector
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → dcamp
I think this happens with about:* pages (same behavior with about:home).
Attached patch fix (obsolete) — Splinter Review
Attachment #602945 - Flags: review?
Attachment #602945 - Flags: review? → review?(jwalker)
Comment on attachment 602945 [details] [diff] [review]
fix

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

This may be hacky but it has 2 great features for hacky:
- It's short
- There are more lines of comment than hack

::: browser/devtools/styleinspector/CssRuleView.jsm
@@ +724,4 @@
>      }
>      this._viewedElement = null;
>      this._elementStyle = null;
> +    this._focusBackstop = null;

Way back when I was a C programmer doing manual memory management, I had a rule for getting it right - symmetry - there must be symmetry between allocation and deallocation, so I might remove the event listener before I delete the element.

(That's a 'yes I read this' comment. You probably want to ignore me :)
Attachment #602945 - Flags: review?(jwalker) → review+
That patch included some half-baked broken test changes in addition to the working new test.  Pulled that out, ran through try:

https://tbpl.mozilla.org/?tree=Try&rev=af755dafec46
Attachment #603921 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/cef966930777
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.