Opened 10 years ago
Closed 10 years ago
#12748 closed defect (fixed)
[patch] [ccla] ScrollingTabController doesn't properly select child before started
Reported by: | Brian Arnold | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dijit | Version: | 1.6.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
We've observed that when a tab container was created (either declaratively or programmatically) that if a tab was selected that would be outside of initial scroll position, that it wouldn't show the tab properly. Later tab selections would cause the scroll properly, but it wasn't happening prior to startup.
Looking through the code, it appears that the ScrollingTabController?'s _selectedTab properly was only being set if _postResize were true. Adjusting it to properly set _selectedTab and then only execute the smooth scroll if _postResize is true.
I've attached a small patch that was written against r24446 of dijit's trunk, as well as a couple of example files that work against 1.6.0 on Google CDN, and have tested this code against Chrome 10, Firefox 4, and IE8. This work falls under SitePen?'s CCLA.
Attachments (3)
Change History (7)
Changed 10 years ago by
Attachment: | scrollingtabcontroller.patch added |
---|
Changed 10 years ago by
Attachment: | example.html added |
---|
Example of a selected tab not showing properly
Changed 10 years ago by
Attachment: | example_patched.html added |
---|
Example of applying this patch to ScrollingTabController?'s prototype (using safeMixin so that this.inherited works)
comment:2 Changed 10 years ago by
Thanks for the patch and test file. Unfortunately the patch causes a failure in the dijit/test/layout/TabContainer.html test file (before adding a new test for this ticket).
comment:3 Changed 10 years ago by
Milestone: | tbd → 1.7 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
Hmm, actually nevermind, it's not happening for me anymore, I guess it's an intermittent failure. I'll check in your fix, thanks.
comment:4 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch to ScrollingTabController? to properly set selected tab