imports/vx/client/code/ux.js
/**
     * A problem with Firefox and IE: lists of items that have tabindex=0 set will not
     * automatically receive focus when clicked.  This doesn't seem to affect Chrome or Safari, including
     * iOS.  As a work-around, when an element is clicked, ensure that the element is
     * programmatically focused if it has not already been focused implicitly.
     *
     * @param {object} event Click event.
     * @param {string} selector Class name of container to receive focus.
     */
A problem with Firefox and IE: lists of items that have tabindex=0 set will not
automatically receive focus when clicked.  This doesn't seem to affect Chrome or Safari, including
iOS.  As a work-around, when an element is clicked, ensure that the element is
programmatically focused if it has not already been focused implicitly.

@param {object} event Click event.
@param {string} selector Class name of container to receive focus.
A problem with Firefox and IE : lists of items that have tabindex = 0 set will not automatically receive focus when clicked . This doesn ' t seem to affect Chrome or Safari including iOS . As a work - around when an element is clicked ensure that the element is programmatically focused if it has not already been focused implicitly . @param { object } event Click event . @param { string } selector Class name of container to receive focus .
fixFocus(event, selector) {
        let $container = $(event.target).closest(selector)
        if (!$container.exists()) {
            OLog.error(`ux.js fixFocus selector=[${selector}] could not find container, no action will be taken`)
        }
        if ($container.is(":focus")) {
            OLog.debug(`ux.js fixFocus selector=[${selector}] container already has focus, no action will be taken`)
        }
        else {
            OLog.debug(`ux.js fixFocus selector=[${selector}] container does not already have focus, setting focus programmatically`)
            $container.focus()
        }
    }
fixFocus ( event , selector ) { let $container = $ ( event . target ) . closest ( selector ) if ( ! $container . exists ( ) ) { OLog . error ( ` ${ selector } ` ) } if ( $container . is ( ":focus" ) ) { OLog . debug ( ` ${ selector } ` ) } else { OLog . debug ( ` ${ selector } ` ) $container . focus ( ) } }
A problem with Firefox and IE: lists of items that have tabindex=0 set will not
 automatically receive focus when clicked.
A problem with Firefox and IE : lists of items that have tabindex = 0 set will not automatically receive focus when clicked .