Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-2662

In the keyboard-a11y plugin, onLeaveContainer and onUnselect are not called when the user moves focus outside the container of selectables.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.7, 0.8, 1.0
    • 1.1
    • Keyboard Accessibility
    • None

    Description

      There's a bug in the keyboard-a11y plugin where neither the onLeaveContainer and onUnselect callbacks are invoked when the user blurs out of the container of selectable elements. Here's the buggy code, starting on line 265 of keyboard-a11y.js:

      var cleanUpWhenLeavingContainer = function(selectionContext) {
      if (selectionContext.onLeaveContainer)

      { selectionContext.onLeaveContainer( selectionContext.selectables[selectionContext.activeItemIndex]); }

      else if (selectionContext.onUnselect)

      { selectionContext.onUnselect( selectionContext.selectables[selectionContext.activeItemIndex]); }

      The reason for this issue is that user-specified callbacks are actually located in the "options" property of the selection context. The code should look like this:

      if (selectionContext.options.onLeaveContainer)

      { selectionContext.options.onLeaveContainer( selectionContext.selectables[selectionContext.activeItemIndex]); }

      else if (selectionContext.options.onUnselect)

      { selectionContext.options.onUnselect( selectionContext.selectables[selectionContext.activeItemIndex]); }

      I'll write a test to show this issue and then fix.

      Attachments

        Activity

          People

            colin Colin Clark
            colin Colin Clark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: