Closed
Bug 346441
Opened 18 years ago
Closed 18 years ago
Closing the rightmost tab in the overflow case looks bad
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta2
People
(Reporter: asqueella, Assigned: moco)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
asaf
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
STR:
1. Open enough tabs with CTRL+T to trigger tab overflow, then several additional tabs.
2. Scroll to and select the rightmost tab
3. Close it (e.g. via CTRL+W or by middle-clicking)
Actual results:
The tab gets closed and the tab to the left gets selected *then* the newly selected tab gets scrolled to fill up the freed space. This looks really annoying and visually displeasing.
Expected results:
Scrolling the tabstrip and closing the current tab/selecting the tab to the left should happen simultaneously, just like when you close tabs in the non-overflow case.
Reporter | ||
Comment 1•18 years ago
|
||
This happens in trunk builds as well as 1.8 builds. I'm tempted to ask for blocking fx2, but I won't given that tab overflow is considered an edge case and this is just a visual problem, albeit an annoying one.
Assignee | ||
Comment 2•18 years ago
|
||
I see the problem, and I have a change that appears to solve it, but it feels risky for FF2.
in removeTab(), we currently remove the tab and the select the new tab.
// Remove the tab
this.mTabContainer.removeChild(oldTab);
// invalidate cache, because mTabContainer is about to change
this._browsers = null;
this.mPanelContainer.removeChild(oldBrowser.parentNode);
// Find the tab to select
...
this.updateCurrentBrowser();
// see comment above destroy above
oldBrowser.focusedWindow = null;
oldBrowser.focusedElement = null;
if we select the tab, and then remove it, the "looking bad on close" issue goes away.
// Find the tab to select
...
this.updateCurrentBrowser();
// Remove the tab
this.mTabContainer.removeChild(oldTab);
// invalidate cache, because mTabContainer is about to change
this._browsers = null;
this.mPanelContainer.removeChild(oldBrowser.parentNode);
// see comment above destroy above
oldBrowser.focusedWindow = null;
oldBrowser.focusedElement = null;
but, this sort of change makes me pretty nervous right before we ship, as I'm not aware of all the implications of changing the order like that.
Assignee: nobody → sspitzer
Target Milestone: --- → Firefox 2 beta2
Assignee | ||
Comment 3•18 years ago
|
||
clearing the TM.
note, this is a new issue (for FF2) because of the scrolling tab strip.
Target Milestone: Firefox 2 beta2 → ---
Comment 4•18 years ago
|
||
I think we should first move (and clean up!) the scroll-to-end code from adjustTabstrip to removeTab so it isn't done post-reflow.
Comment 5•18 years ago
|
||
See also bug 324449, moving that code around can have other consequences.
Comment 6•18 years ago
|
||
Comment 7•18 years ago
|
||
Sorry, yes, it was a reply to comment 2, and perhaps not that useful. I just recalled changing that code before and was trying to figure out where.
Assignee | ||
Comment 8•18 years ago
|
||
> I think we should first move (and clean up!) the scroll-to-end code from
> adjustTabstrip to removeTab so it isn't done post-reflow.
I like your idea of removing the aRemovingTab parameter from adjustTabstrip().
I'm trying out a patch to move the scroll-to-end code from adjustTabstrip() to removeTab() [after the point where we call removeChild()]
asaf, what did you have in mind for cleaning up this code?
Assignee | ||
Comment 9•18 years ago
|
||
Attachment #231797 -
Flags: review?(bugs.mano)
Assignee | ||
Comment 10•18 years ago
|
||
schrep, this is one of those UI nits that I mentioned.
it's a "new" issue with FF2, as it started being an issue with tab overflow.
I'd like to fix this, but it may not be bad enough to block ff2.
ben/beltzner/mconnor, comments?
Status: NEW → ASSIGNED
Flags: blocking-firefox2?
Assignee | ||
Comment 11•18 years ago
|
||
Attachment #231825 -
Flags: review?(bugs.mano)
Assignee | ||
Updated•18 years ago
|
Attachment #231797 -
Attachment is obsolete: true
Attachment #231797 -
Flags: review?(bugs.mano)
Assignee | ||
Comment 12•18 years ago
|
||
asaf wrote:
1) first of all this isn't a "hack" anymore :)
2) declare and set tabWidth inside the if block (that's, don't get it if we don't need it)
3) we don't need the tabstrip var i think
4) you may also want to put the whole thing in a try catch block
I kept tabstrip (comment 3) to keep the code cleaner.
Attachment #231825 -
Attachment is obsolete: true
Attachment #231842 -
Flags: review?(bugs.mano)
Attachment #231825 -
Flags: review?(bugs.mano)
Comment 13•18 years ago
|
||
Comment on attachment 231842 [details] [diff] [review]
updated patch, per asaf's review in irc
r=mano.
Attachment #231842 -
Flags: review?(bugs.mano) → review+
Assignee | ||
Comment 14•18 years ago
|
||
fixed on the trunk.
thanks again to asaf for suggesting the fix.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [fixed on the trunk, will bake on the trunk]
Updated•18 years ago
|
Flags: blocking-firefox2? → blocking-firefox2+
Assignee | ||
Updated•18 years ago
|
Target Milestone: --- → Firefox 2 beta2
Assignee | ||
Updated•18 years ago
|
Attachment #231842 -
Flags: approval1.8.1?
Comment 15•18 years ago
|
||
Comment on attachment 231842 [details] [diff] [review]
updated patch, per asaf's review in irc
a=beltzner for drivers
Attachment #231842 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Comment 16•18 years ago
|
||
fixed on the branch
Keywords: fixed1.8.1
Whiteboard: [fixed on the trunk, will bake on the trunk]
You need to log in
before you can comment on or make changes to this bug.
Description
•