Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Strange Behavior with Select One Component in Toolbar

DaveArchJan 30 2020 — edited Feb 3 2020

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:

  1. 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

  2. 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)

toolbar_issue_0.PNG

Click 2

toolbar_issue_1.PNG

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?

This post has been answered by Duncan Mills-Oracle on Jan 30 2020
Jump to Answer
Comments
Post Details
Added on Jan 30 2020
5 comments
317 views