Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11915

MenuGroup with all items disabled or no items causes JS error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.1.0.Final
    • Fix Version/s: 4.5.13
    • Component/s: component-menu
    • Labels:
      None
    • Environment:

      Tomcat 6.0.26, MyFaces 2.1.13, RichFaces

    • Steps to Reproduce:
      Hide

      Test case {also works with "Disabled item" removed):

      <rich:toolbar layout="hbr">
          <rich:dropDownMenu label="Menu test case">
              <rich:menuItem label="First item" />
              <rich:menuGroup label="Submenu with disabled items">
                   <rich:menuItem label="Disabled item" disabled="true" />
              </rich:menuGroup>
              <rich:menuItem label="Last item" />
          </rich:dropDownMenu>
      </rich:toolbar>
      
      1. open the menu "Menu test case"
      2. move the cursor down by the items
      3. after leaving "Submenu with disabled items" and moving to "Last item", the error appears.
      Show
      Test case {also works with "Disabled item" removed): <rich:toolbar layout= "hbr" > <rich:dropDownMenu label= "Menu test case " > <rich:menuItem label= "First item" /> <rich:menuGroup label= "Submenu with disabled items" > <rich:menuItem label= "Disabled item" disabled= " true " /> </rich:menuGroup> <rich:menuItem label= "Last item" /> </rich:dropDownMenu> </rich:toolbar> open the menu "Menu test case" move the cursor down by the items after leaving "Submenu with disabled items" and moving to "Last item", the error appears.
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Avoid empty or disable-only submenus.

      Show
      Avoid empty or disable-only submenus.

      Description

      Submenu (r:menuGroup) containing only disabled items or no items, causes a JavaScript error when it is supposed to get hidden (moving cursor to the next item in the parent menu).

      In Firefox 9:

      parentMenu is undefined
      menu-base.js, line 126

      In MSIE 7:

      'nodeType' is null or not an object
      richfaces.js, line 43

      It's the same error only reported from the different level of the call stack.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  michpetrov Michal Petrov
                  Reporter:
                  jan.halasa Ján Halaša
                • Votes:
                  3 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: