Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6747

Disabled buttons in dropdown menus are still functional

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.0.0.Alpha3
    • 8.2.2.Final
    • Console
    • None

    Description

      For example, on cache detail page, in "Actions" dropdown menu, if cache is enabled than the "Enable" option is disabled. Currently, the button is grey, but when you try clicking on it, it will execute the operation anyway. Please note that this affects every button in the dropdown menus, more specifically every <a> link, because you cannot use disabled="disabled" (therefore ng-disabled) on the <a> link as you do with the <button> elements.

      I found a root cause and also a fix, however, I wasn't able to find a place, where to modify the CSS style, since the hierarchy is quite complicated. To fix the issue, you have to add

      li.disabled {
        cursor: not-allowed;
      }
      

      to the CSS of the directly encapsulating <li>, and following

      li.disabled a {
        pointer-events: none;
      }
      

      to the CSS of the disabled <a> tag. The reason to split this two is that the cursor and pointer-events don't work well together and we want to have both "not-allowed" cursor and not-clickable link. See https://github.com/twbs/bootstrap/issues/16088 for details.

      I would be happy to implement the fix and send a PR, just give me a hint which one is the CSS style to be modified. I essentially need to modify the CSS on the URL http://localhost:9990/console/built_components/patternfly/dist/css/patternfly.css . Or should it be overwritten somewhere else?
      I've tested the fix via modifying the CSS directly in the browser on the fly, so I can confirm that it works.

      Attachments

        Issue Links

          Activity

            People

              vblagoje Vladimir Blagojevic (Inactive)
              jholusa Jiří Holuša (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: