[ 3 posts ]

Wei Wang

YUI Contributor

  • Username: Shinwei
  • Joined: Wed Oct 27, 2010 1:45 pm
  • Posts: 91
  • GitHub: onlywei
  • Gists: onlywei
  • Offline
  • Profile
Tags:

Tabview 'selectionChange' event happens too early

Post Posted: Tue Apr 17, 2012 9:54 am
+1-
I am subscribing to the 'selectionChange' event in my tabview by using the after method:

Code:
myTabview.after('selectionChange', myFunction);


Problem is, when myFunction is called, the panelNode for the tab I am switching to is still hidden! (i.e. the 'yui-tab-panel-selected' class has not yet been applied, so it is still "display: none;");

Is there some event I can listen for that fires as soon as the tab panelNode becomes visible and gets the "yui-tab-panel-selected" class applied to it?

John Lindal

YUI Contributor

  • Username: jafl
  • Joined: Mon Nov 02, 2009 2:33 pm
  • Posts: 358
  • Location: Los Angeles, CA
  • Twitter: jafl5272
  • GitHub: jafl
  • Gists: jafl
  • Offline
  • Profile

Re: Tabview 'selectionChange' event happens too early

Post Posted: Mon Apr 23, 2012 9:17 am
+0-
I created this ticket:

http://yuilibrary.com/projects/yui3/ticket/2532189

The workaround is to use the following construct:

myTabview.after('selectionChange', function(e)
{
Y.later(0, null, myFunction, e);
});

Wei Wang

YUI Contributor

  • Username: Shinwei
  • Joined: Wed Oct 27, 2010 1:45 pm
  • Posts: 91
  • GitHub: onlywei
  • Gists: onlywei
  • Offline
  • Profile

Re: Tabview 'selectionChange' event happens too early

Post Posted: Fri May 04, 2012 3:08 pm
+0-
I was able to get the correct timing by listening to the 'selectedChange' event of the CHILD TAB instead of the PARENT TABVIEW.
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum