File tree 3 files changed +31
-3
lines changed
3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -586,12 +586,14 @@ class List extends UI5Element {
586
586
587
587
isForwardElement ( node ) {
588
588
const nodeId = node . id ;
589
+ const afterElement = this . getAfterElement ( ) ;
590
+ const beforeElement = this . getBeforeElement ( ) ;
589
591
590
- if ( this . _id === nodeId || this . getBeforeElement ( ) . id === nodeId ) {
592
+ if ( this . _id === nodeId || ( beforeElement && beforeElement . id === nodeId ) ) {
591
593
return true ;
592
594
}
593
595
594
- return this . getAfterElement ( ) . id === nodeId ;
596
+ return afterElement && afterElement . id === nodeId ;
595
597
}
596
598
597
599
onItemFocused ( event ) {
Original file line number Diff line number Diff line change @@ -174,6 +174,20 @@ <h2 id="testHeader">Test aria</h2>
174
174
</ ui5-list >
175
175
176
176
< ui5-input value ="0 " id ="customListItemEvents "> </ ui5-input >
177
+ < br />
178
+ < br />
179
+ < ui5-button id ="btnOpenPopup "> Open popup with List</ ui5-button >
180
+ < ui5-responsive-popover id ="popup " placement-type ="Bottom " style ="width: 300px;height: 18rem; ">
181
+ < ui5-list >
182
+ < div slot ="header ">
183
+ < ui5-button id ="btnInHeader " icon ="refresh " />
184
+ </ div >
185
+ </ ui5-list >
186
+
187
+ < ui5-list style ="height: 15rem " infinite-scroll no-data-text ="No data ">
188
+ < ui5-li > Test</ ui5-li >
189
+ </ ui5-list >
190
+ </ ui5-responsive-popover >
177
191
178
192
< script >
179
193
'use strict' ;
@@ -249,9 +263,13 @@ <h2 id="testHeader">Test aria</h2>
249
263
customListItemEventsValue = 0 ,
250
264
customListItemEventsInput = document . getElementById ( "customListItemEvents" ) ;
251
265
252
- ui5List . addEventListener ( "ui5-item-click" , ( event ) => {
266
+ ui5List . addEventListener ( "ui5-item-click" , function ( event ) {
253
267
customListItemEventsInput . value = ++ customListItemEventsValue ;
254
268
} ) ;
269
+
270
+ btnOpenPopup . addEventListener ( "click" , function ( ) {
271
+ popup . openBy ( btnOpenPopup ) ;
272
+ } ) ;
255
273
</ script >
256
274
</ body >
257
275
</ html >
Original file line number Diff line number Diff line change @@ -303,4 +303,12 @@ describe("List Tests", () => {
303
303
304
304
assert . strictEqual ( input . getProperty ( "value" ) , "0" , "item-click event is not fired when the button is pressed." ) ;
305
305
} ) ;
306
+
307
+ it ( "Popover with List opens without errors" , ( ) => {
308
+ const btnPopupOpener = $ ( "#btnOpenPopup" ) ;
309
+ const btnInListHeader = $ ( "#btnInHeader" ) ;
310
+
311
+ btnPopupOpener . click ( ) ;
312
+ assert . strictEqual ( btnInListHeader . isFocused ( ) , true , "The List header btn is focused." ) ;
313
+ } ) ;
306
314
} ) ;
You can’t perform that action at this time.
0 commit comments