Skip to content

Commit 53418fb

Browse files
authored
fix(ui5-select): fix popover opening (#2687)
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
1 parent a442dbf commit 53418fb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/main/src/Select.hbs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
class="ui5-select-root"
33
dir="{{effectiveDir}}"
44
id="{{_id}}-select"
5-
@click="{{_toggleRespPopover}}"
5+
@click="{{_onclick}}"
66
>
77
<div class="ui5-select-label-root"
8+
data-sap-focus-ref
89
tabindex="{{tabIndex}}"
910
role="combobox"
1011
aria-haspopup="listbox"

packages/main/src/Select.js

+5
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ class Select extends UI5Element {
456456
this._toggleRespPopover();
457457
}
458458

459+
_onclick(event) {
460+
this.getFocusDomRef().focus();
461+
this._toggleRespPopover();
462+
}
463+
459464
/**
460465
* The user used arrow up/down on the list
461466
* @private

0 commit comments

Comments
 (0)