Jet Version: 8.0
App Platform: Web
Device: Desktop
Hi Community
We are using a Select One component in a Toolbar.
There are 2 issues we are seeing:
-
If other components are within the Toolbar i.e. a Button, you need to select the Select One component twice to pop the values list
-
If the Select One component is the only component within the Toolbar, the component raises a browser error (Chrome & Firefox) 'Cannot read property 'focus' of undefined' when selecting the value
1) Scenario 1
Button included in toolbar with Select One component:
HTML:
<oj-toolbar id='mytoolbar' class="oj-toolbar-top-border oj-toolbar-bottom-border">
\<oj-select-one id\="selectonecomp"\>
\<oj-option value\="ALL"\>Show All\</oj-option>
\<oj-option value\="UNAPPROVED"\>Unapproved\</oj-option>
\<oj-option value\="APPROVED"\>Approved\</oj-option>
\</oj-select-one>
\<span role\="separator" aria-orientation\="vertical" class\="oj-toolbar-separator"\>\</span>
\<oj-button chroming\="callToAction"\>
Button
\</oj-button>
</oj-toolbar>
Outcome: Have to click component twice to get the list to pop.
Click 1 (no change)

Click 2

2) Scenario 2
Select One is only component within toolbar:
HTML:
<oj-toolbar id='mytoolbar' class="oj-toolbar-top-border oj-toolbar-bottom-border">
\<oj-select-one id\="selectonecomp"\>
\<oj-option value\="ALL"\>Show All\</oj-option>
\<oj-option value\="UNAPPROVED"\>Unapproved\</oj-option>
\<oj-option value\="APPROVED"\>Approved\</oj-option>
\</oj-select-one>
\<span role\="separator" aria-orientation\="vertical" class\="oj-toolbar-separator"\>\</span>
</oj-toolbar>
Outcome: Single click pops list of values but a browser error raised in the background the first time:
ojtoolbar.js:472 Uncaught TypeError: Cannot read property 'focus' of undefined
at $.\<computed>.\<computed>.\_handleInitialFocus (ojtoolbar.js:472)
at $.\<computed>.\<computed>.\_handleInitialFocus (widget.js:132)
at HTMLElement.\_focusinListener (ojtoolbar.js:363)
at HTMLDivElement.handler (jquery-3.4.1.js:5455)
at HTMLDivElement.dispatch (jquery-3.4.1.js:5237)
at HTMLDivElement.elemData.handle (jquery-3.4.1.js:5044)
at Object.trigger (jquery-3.4.1.js:8471)
at HTMLDivElement.\<anonymous> (jquery-3.4.1.js:8549)
at Function.each (jquery-3.4.1.js:367)
at jQuery.fn.init.each (jquery-3.4.1.js:202)
Could this be a bug?