Closed Bug 566096 Opened 14 years ago Closed 14 years ago

Inspect menu item's check mark gets out of sync when switching tabs

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ehsan.akhgari, Assigned: rcampbell)

References

Details

(Whiteboard: [checked-in])

Attachments

(1 file, 2 obsolete files)

If you turns Inspect on on a tab, and switch to the other tab, the menu item remains checked.  If you click it again, Inspect is activated on the new tab and the menu item remains checked.  Clicking it again unchecks it.
whups. Must have missed that case. Thanks.
Attached patch inspect command checkmark (obsolete) — Splinter Review
Attachment #445949 - Flags: review?(gavin.sharp)
This patch moves the update to the individual closeInspectorUI and openInspectorUI methods from toggleInspectorUI where it was being missed on TabSelect.

this could use a simple test to go along with it.
Assignee: nobody → rcampbell
Status: NEW → ASSIGNED
Depends on: 561782
Flags: in-testsuite?
Keywords: helpwanted
OS: Mac OS X → All
Hardware: x86 → All
Did you mean to add helpwanted on this bug?
I would take help if it was offered!
Comment on attachment 445949 [details] [diff] [review]
inspect command checkmark

Probably wouldn't hurt to add a smart getter for this:

XPCOMUtils.defineLazyGetter(InspectorUI, "inspectCmd", function () {
  return document.getElementById("Tools:Inspect");
});

and then just use this.inspectCmd everywhere.

(If you don't do that, put the toolsInspectCmd declarations just before their use, rather than at the beginning of the function.)
Attachment #445949 - Flags: review?(gavin.sharp) → review+
I like this. Should I be doing this for the other calls to getElementById() in the InspectorUI constructor?
s/constructor/opener/ in the last comment.
Attached patch inspect command checkmark (obsolete) — Splinter Review
updated patch. Ready for checkin.
Attachment #445949 - Attachment is obsolete: true
Attachment #446222 - Flags: review+
Comment on attachment 446222 [details] [diff] [review]
inspect command checkmark

(r+ from gavin in previous patch, just carried it forward)
Whiteboard: [checkin-needed]
review carried forward. ready to checkin.
Attachment #446222 - Attachment is obsolete: true
Attachment #446515 - Flags: review+
Comment on attachment 446515 [details] [diff] [review]
inspect command checkmark

checked-in

changeset:   42501:6033fff0ffd0
Whiteboard: [checkin-needed] → [checked-in]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Keywords: helpwanted
Flags: in-testsuite?
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: