Opened 12 years ago

Closed 12 years ago

#4211 closed defect (fixed)

TabContainer - retains hover state class

Reported by: dante Owned by: bill
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

seen in themeTester.html

  1. select "Closable" tab
  2. hover CloseNode? (the [x])
  3. select another tab
  4. the "closable" tab still looks selected

Attachments (2)

Picture 5.png (10.0 KB) - added by guest 12 years ago.
Screenshot of your TabContainer? test showing the problem
stackcontainer.patch (446 bytes) - added by guest 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by dante

Resolution: worksforme
Status: newclosed

something fixed this. no longer seeing it.

Changed 12 years ago by guest

Attachment: Picture 5.png added

Screenshot of your TabContainer? test showing the problem

comment:2 Changed 12 years ago by guest

Resolution: worksforme
Status: closedreopened

I am currently working on the latest code (trunk). I still have problems with the hover status class. Summarizing:

  • I select a tab which is closable
  • I go hover the close icon
  • I select another tab
  • The previously selected tab is still displaying the same color even if it is not selected anymore
  • It goes back to the right color if I move the mouse hover its close icon again

(see attached pic) Paolo

Changed 12 years ago by guest

Attachment: stackcontainer.patch added

comment:3 in reply to:  description Changed 12 years ago by guest

I added the stackcontainer.patch This issue was the dijitTabCloseButton not updating its status when the child switched if the style was "Checked" This patch updates the status of the button.

Email I submitted a CLA is sathallrin@…

comment:4 Changed 12 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Milestone: 1.0
Owner: anonymous deleted
Status: reopenednew

Updating description as per your previous comment. Thanks for the patch, although I think this demonstrates a problem with _setStateClass() and baseClass that needs to be fixed.

comment:5 Changed 12 years ago by guest

Hi there, I'm not one that submitted the patch (not the bug submitter). I agree with you bill, as I was trying to find the problem I noticed that both the tab and the close buttons were using the same div node for baseClass so the node was getting the dijitTabCloseButton and dijitTab classes applied to it. Then in the _setStateClass() function it didn't update the child baseClass on the checked status change. My first attempt at making a patch was trying to accomplish changing it in _setStateClass(), but I couldn't figure out how to find child baseClass(es) so I made a quick patch to update the child baseClass on tab change.

-Sathallrin

comment:6 Changed 12 years ago by bill

Owner: set to bill

comment:7 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10706]) Refactor setStateClass() related code so that:

  • baseClass is always specified in javascript, in this.baseClass, not on the dom node
  • If you need different CSS classes based on (for example) hovering over the tab label vs. the tab close button, set stateModifier="CloseButton?" on the tab close button node (which must also have dojoAttachEvent="onmouseenter: _onMouse, onmouseleave: _onMouse"

Fixes #4609, #4211, and I suppose it also allows the user to affect styling by specifying baseClass=foo in markup. Well, that was working before for most of the form widgets but I guess now it works for all of them.

Note: See TracTickets for help on using tickets.