style inspector loses focus after entering attribute name

RESOLVED FIXED in Firefox 13

Status

()

Firefox
Developer Tools: Inspector
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Stefan, Assigned: dcamp)

Tracking

Trunk
Firefox 13
Other
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ruleview])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

5 years ago
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.

Comment 1

5 years ago
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

Updated

5 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

5 years ago
Assignee: nobody → dcamp

Comment 2

5 years ago
I think this happens with about:* pages (same behavior with about:home).
Whiteboard: [ruleview]
(Assignee)

Comment 3

5 years ago
Created attachment 602945 [details] [diff] [review]
fix
Attachment #602945 - Flags: review?
(Assignee)

Updated

5 years ago
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+
(Assignee)

Comment 5

5 years ago
Created attachment 603921 [details] [diff] [review]
updated per review comment

https://tbpl.mozilla.org/?tree=Try&rev=267a47771847
Attachment #602945 - Attachment is obsolete: true
(Assignee)

Comment 6

5 years ago
Created attachment 604162 [details] [diff] [review]
removed broken test changes

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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
You need to log in before you can comment on or make changes to this bug.