Skip to content

Commit

Permalink
fix(ui5-select): fix popover opening (#2687)
Browse files Browse the repository at this point in the history
When the accessibility refactoring of was done the focus reference was changed. The click event should focus the correct element so the internal rules which controls the visibility of value state could pass.

Fixes: #2682
  • Loading branch information
nnaydenow authored Jan 15, 2021
1 parent a442dbf commit 53418fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/main/src/Select.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
class="ui5-select-root"
dir="{{effectiveDir}}"
id="{{_id}}-select"
@click="{{_toggleRespPopover}}"
@click="{{_onclick}}"
>
<div class="ui5-select-label-root"
data-sap-focus-ref
tabindex="{{tabIndex}}"
role="combobox"
aria-haspopup="listbox"
Expand Down
5 changes: 5 additions & 0 deletions packages/main/src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ class Select extends UI5Element {
this._toggleRespPopover();
}

_onclick(event) {
this.getFocusDomRef().focus();
this._toggleRespPopover();
}

/**
* The user used arrow up/down on the list
* @private
Expand Down

0 comments on commit 53418fb

Please sign in to comment.