Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] TabView initialisation bugs?

Expand Messages
  • Eric Miraglia
    Thanks, Nick. We ll take a look. Regards, Eric ______________________________________________ Eric Miraglia Yahoo! User Interface Library
    Message 1 of 3 , May 30, 2007
      Thanks, Nick.  We'll take a look.

      Regards,
      Eric

      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library



      On May 30, 2007, at 7:14 PM, Nick Fitzsimons wrote:

      Hi,

      I've gone ahead and filed the two cases outlined in my original
      message (quoted below) as bugs:

      <http://sourceforge.net/tracker/index.php?
      func=detail&aid=1728689&group_id=165715&atid=836476>
      <http://sourceforge.net/tracker/index.php?
      func=detail&aid=1728698&group_id=165715&atid=836476>

      because nobody told me it was my own incompetence that broke it :-)

      (BTW, although the bug descriptions on SourceForge are predominantly
      pasted from the message below, I did add some additional verbiage
      that may or may not be of value.)

      Cheers,

      Nick.

      On 23 May 2007, at 15:04:23, Nick Fitzsimons wrote:

      > I've identified what I believe are two probable bugs in TabView.
      >
      > Putative Bug #1:
      >
      > <http://www.nickfitz.co.uk/tests/javascript/yui/tabview/tabview-
      > test.html>
      >
      > I am using a TabView in which the tabs and content are generated
      > dynamically, but the container already exists in the markup.
      > Therefore, I have HTML:
      >
      > <div id="index"></div>
      >
      > and initalise the TabView using
      >
      > var indexTabView = new YAHOO.widget.TabView("index");
      >
      > When this is done, the initialisation of the container element fails
      > to add the tabView's CLASSNAME property "yui-navset" to the
      > container, resulting in the CSS not being applied. When the relevant
      > className is added, as when clicking on the button in the test page
      > linked above, or already exists in the markup, all is well.
      >
      > Looking through the YUI examples related to creating a TabView (as
      > opposed to styling it), there seems to be only one example with the
      > same scenario of the container already existing, the "Basic from
      > existing markup" demo. However in that case the "yui-navset" class
      > attribute is already present in the HTML, so the problem is not
      > apparent.
      >
      > I would assume that, when given a container and building the rest of
      > the TabView from scratch, the CLASSNAME should be applied (if
      > necessary) to the container; however this only happens if the
      > container itself is also created dynamically (in
      > _createTabViewElement).
      >
      >
      > Putative Bug #2:
      >
      > <http://www.nickfitz.co.uk/tests/javascript/yui/tabview/tabview-
      > test-2.html>
      >
      > If the TabView is constructed using:
      >
      > new YAHOO.widget.TabView({id: "index"});
      >
      > then, in the case where the element with id "index" already exists in
      > the markup, a new element is created within the TabView constructor
      > (due to the lack of an "element" configuration property and a failure
      > to test for the pre-existing element with the specified id) and used
      > as the TabView container, but is never actually inserted into the
      > document, because (I think) there is already an element with id
      > "index". Therefore all the tabs are created within an element that is
      > never inserted into the document. I haven't tracked it down any more
      > narrowly than that :-)

      > I'm assuming these are both bugs, or have I missed something? If
      > they're bugs, and not just me doing something stupid, I'll go ahead
      > and file them both at Sourceforge.

      --
      Nick Fitzsimons
      http://www.nickfitz.co.uk/


    Your message has been successfully submitted and would be delivered to recipients shortly.