Closed
Bug 635696
Opened 13 years ago
Closed 13 years ago
restore focus after "Undo Close Group" of last group
Categories
(Firefox Graveyard :: Panorama, defect, P4)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: AlexLakatos, Assigned: ttaubert)
References
Details
Attachments
(1 file, 2 obsolete files)
5.38 KB,
patch
|
Details | Diff | Splinter Review |
Panorama does not restore focus after "Undo Close Group" of last group Steps To Reproduce: 1.Close the last goup in Panorama 2.Undo Close Group 3.Press Enter Expected Results: 3.The last focused tab is opened in Tab View Actual Results: 3.The last focused tab is not opened in Tab View, the browser remains in Panorama View As for a regression window, this happens as far as Fx4b7, the first time "Undo Close Group" was introduced.
Reporter | ||
Updated•13 years ago
|
Version: unspecified → Trunk
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → tim.taubert
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #514041 -
Flags: review?(ian)
Comment 2•13 years ago
|
||
Comment on attachment 514041 [details] [diff] [review] patch v1 > _makeClosestTabActive: function GroupItem__makeClosestTabActive() { > let closeCenter = this.getBounds().center(); > // Find closest tab to make active > let closestTabItem = UI.getClosestTab(closeCenter); >- UI.setActiveTab(closestTabItem); >- > // set the active group or orphan tabitem. > if (closestTabItem) { >+ UI.setActiveTab(closestTabItem); This change is a problem; even if there's no closest tab, we need to null the active tab when its group gets hidden, or we'll run into trouble when we exit tab view. >+ if (!GroupItems.getActiveGroupItem() && !GroupItems.getActiveOrphanTab()) >+ GroupItems.setActiveGroupItem(this); I would say this shouldn't be an if... when you undo a close group, it should always become the active group. Also its active tab should become the UI activeTab. >+function hideGroup(groupItem, callback) { >+ groupItem.addSubscriber(groupItem, "groupHidden", function () { >+ groupItem.removeSubscriber(groupItem, "groupHidden"); >+ callback(); >+ }); >+ groupItem.closeAll(); >+} >+ >+function unhideGroup(groupItem, callback) { >+ groupItem.addSubscriber(groupItem, "groupShown", function () { >+ groupItem.removeSubscriber(groupItem, "groupShown"); >+ callback(); >+ }); >+ groupItem._unhide(); >+} Candidates for head.js? They should be called hideGroupItem and unhideGroupItem.
Attachment #514041 -
Flags: review?(ian) → review-
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to comment #2) > This change is a problem; even if there's no closest tab, we need to null the > active tab when its group gets hidden, or we'll run into trouble when we exit > tab view. Removed as this isn't needed anymore when removing the "if" at the bottom. > I would say this shouldn't be an if... when you undo a close group, it should > always become the active group. Also its active tab should become the UI > activeTab. Fixed. > Candidates for head.js? They should be called hideGroupItem and > unhideGroupItem. Done.
Attachment #514041 -
Attachment is obsolete: true
Attachment #514067 -
Flags: review?(ian)
Comment 4•13 years ago
|
||
Comment on attachment 514067 [details] [diff] [review] patch v2 Lovely!
Attachment #514067 -
Flags: review?(ian) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Comment on attachment 514067 [details] [diff] [review] patch v2 Note to approvers: Very small and low-risk patch with a test that ensures consistent UI behavior.
Attachment #514067 -
Flags: approval2.0?
Assignee | ||
Comment 6•13 years ago
|
||
Comment on attachment 514067 [details] [diff] [review] patch v2 Passed try: http://tbpl.mozilla.org/?tree=MozillaTry&pusher=tim.taubert@gmx.de&rev=aba17c0eb518
Comment 7•13 years ago
|
||
Comment on attachment 514067 [details] [diff] [review] patch v2 a=beltzner
Attachment #514067 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #514067 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 9•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/41297d3b8511
Comment 10•13 years ago
|
||
Mozilla/5.0 (X11; Linux i686; rv:2.0b13pre) Gecko/20110224 Firefox/4.0b13pre Verified issue and it's no longer present.
Status: RESOLVED → VERIFIED
Updated•8 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•