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

Re: Bug in YUI MenuModule (menu.js, line 1332)?

Expand Messages
  • saad_er55
    ... == # );
    Message 1 of 3 , Jul 5, 2006
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "aglenning" <aglenning@...>
      wrote:
      >
      > I am creating a menu from existing markup. Unlike the examples
      > provided, the markup does not have hyperlinks in the menu items -
      > instead I am adding a custom clickEvent handler.
      >
      > When I click on a menu item, the YUI javascript crashes in
      > menu.js(1332). The problem appears that the
      > MenuModule.protype._onelementClick function assumes there must be a
      > URL in each menu item. I can fix the problem by updating the line:
      >
      > bCurrentPageURL = (sURL.substr((sURL.length-1),1) == "#");
      >
      > to
      >
      > bCurrentPageURL = !sURL || (sURL.substr((sURL.length-1),1)
      == "#");
      >
      > since there is no url property in my menu items.
      >
      > Am I doing something wrong, or is this a bug?
      >
      > Many thanks,
      > Tony
      >
    • Todd Kloots
      Hi Tony - This is a known bug and will be fixed in the next release. - Todd
      Message 2 of 3 , Jul 5, 2006
      • 0 Attachment
        Hi Tony -

        This is a known bug and will be fixed in the next
        release.

        - Todd

        --- aglenning <aglenning@...> wrote:

        > I am creating a menu from existing markup. Unlike
        > the examples
        > provided, the markup does not have hyperlinks in the
        > menu items -
        > instead I am adding a custom clickEvent handler.
        >
        > When I click on a menu item, the YUI javascript
        > crashes in
        > menu.js(1332). The problem appears that the
        > MenuModule.protype._onelementClick function assumes
        > there must be a
        > URL in each menu item. I can fix the problem by
        > updating the line:
        >
        > bCurrentPageURL =
        > (sURL.substr((sURL.length-1),1) == "#");
        >
        > to
        >
        > bCurrentPageURL = !sURL ||
        > (sURL.substr((sURL.length-1),1) == "#");
        >
        > since there is no url property in my menu items.
        >
        > Am I doing something wrong, or is this a bug?
        >
        > Many thanks,
        > Tony
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        > ydn-javascript-unsubscribe@yahoogroups.com
        >
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.