Closed Bug 137836 Opened 22 years ago Closed 22 years ago

When active tab is closed, "beforeselected" attribute remains on previous tab


(Core :: XUL, defect)

Not set





(Reporter: bryner, Assigned: bryner)



(Whiteboard: [adt2 rtm] custrtm-)


(2 files)

Steps to reproduce:

- Open a few tabs in the browser window
- Switch to the last tab
- Close the last tab


The formerly next-to-last tab becomes active, but still has the "beforeselected"
attribute set on it.  This can interfere with nsITheme-based drawing and
possibly match incorrect style rules.
Oh, that's why my last tab mostly never has the right-side border in Classic :)
Attached patch patchSplinter Review
This makes sure to clean up the attribute state before the tab is removed.
Comment on attachment 79572 [details] [diff] [review]

Attachment #79572 - Flags: superreview+
nominating for beta... this causes an ugly visual defect in the classic skin
where after you close the last tab, the new last tab will no longer draw the
right-side border of the tab.
Keywords: nsbeta1
Well, not only last tab to be exact, any current tab except the first.
This has been checked into the trunk, keeping bug open for nsbeta1 consideration.
Comment on attachment 79572 [details] [diff] [review]

Um... what was wrong with oldTab.selected = false; ?
See bug 102110 of which this is a duplicate.
Nav triage team: nsbeta1+, adt2 rtm
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt2 rtm]
*** Bug 102110 has been marked as a duplicate of this bug. ***
Right on both counts.  I looked for a dup but this one wasn't apparent from the
summary; and what you suggest is indeed cleaner.  Follow-up patch coming up.
Comment on attachment 80872 [details] [diff] [review]
cleanup per neil's suggestion

Attachment #80872 - Flags: review+
Comment on attachment 80872 [details] [diff] [review]
cleanup per neil's suggestion

Attachment #80872 - Flags: superreview+
Bug 102110 probably wasn't specifc enough to match your query.
Checked into the trunk.  Thanks Neil!
Closed: 22 years ago
Resolution: --- → FIXED
Isn't this fix going into the branch?
You know it causes (or is) bug 116394, which is about the missing borders of 
tabs after closing others...
Blocks: 116394
Nominating for mozilla1.0 (simple fix, fixes an ugly visual defect)
Keywords: mozilla1.0
Keywords: adt1.0.0
adt1.0.0+ (on ADT's behalf) for approval to checkin to the 1.0 branch, pending
Drivers' approval.  After, checking in, please add the fixed1.0 keyword.
Blocks: 143047
Keywords: adt1.0.0adt1.0.0+
Comment on attachment 80872 [details] [diff] [review]
cleanup per neil's suggestion

a=scc (on behalf of drivers) for checkin to the mozilla1.0 branch; please get
it in asap
Attachment #80872 - Flags: approval+
checked in on the branch.
Keywords: fixed1.0.0
Whiteboard: [adt2 rtm] → [adt2 rtm] custrtm-
 verif fixd 0812 brnch/trunk.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.