Commit 5e4a664
authored
fix(ui5-shellbar): fire "click" by the correct abstract ui5-shellbar-item (#4303)
- Fix an issue with the following code, although no longer throws an error as before the recently introduced [fix](https://github.com/SAP/ui5-webcomponents/pull/4287/files) is not complete:
```js
const refItemId = event.target.getAttribute("data-ui5-external-action-item-id");
const shellbarItem = this.items.find(item => {
return this.shadowRoot.querySelector(`#${refItemId}`);
});
```
As this is always true (the clicked item is among all items):
```js
return this.shadowRoot.querySelector(`#${refItemId}`);
```
the result will be always the same - the first ui5-shellbar-item in the array will be returned and the"click" event will be always fired by the first ui5-shellbar-item, although we might click on another custom icon within the bar - the 2nd, 3rd, etc.
- Add a test to avoid degradations1 parent 8553293 commit 5e4a664
File tree
3 files changed
+29
-4
lines changed- packages/fiori
- src
- test
- pages
- specs
3 files changed
+29
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
287 | 297 | | |
288 | 298 | | |
289 | 299 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
64 | 79 | | |
65 | 80 | | |
66 | 81 | | |
| |||
0 commit comments