eBay / ebayui-core

Collection of Marko widgets; considered to be the core building blocks for all eBay components, pages & apps
https://ebay.github.io/ebayui-core/
Other
217 stars 103 forks source link

`ebay-tab`: manual activation doesn't seem to work #887

Closed darkwebdev closed 5 years ago

darkwebdev commented 5 years ago

Bug Report

eBayUI Version: 4.0.0

Description

  1. go to marketplace
  2. scroll to the bottom to see the activation="manual" example
  3. click any tab, press left/right arrow to move focus to another tab
  4. press space or enter
  5. =(

Workaround

Possible cause: https://github.com/eBay/ebayui-core/blob/c019071ef7925e66186ee4b0eff68b3ccaa3c87f/src/components/ebay-tab/index.js#L40

in the function that handles space/enter presses:

eventUtils.handleActionKeydown(event, () => {
            event.preventDefault();

            if (this.state.activation === 'auto') {
                this.setIndex(el.dataset.index);
            }
});

condition is mistakenly inverted and should be this.state.activation === 'manual'

ianmcburnie commented 5 years ago

@darkwebdev thanks for reporting.

@seangates let's investigate and try and get a fix out this week for 4.2.0-1.

ianmcburnie commented 5 years ago

Fixed for v4.2.0