它在chrome和其他浏览器中正常工作,但在IE浏览器中无法正常工作。当我尝试运行chrome时,即使我给了tabindex = 1,它也能正常工作,但是在IE浏览器中却无法提供相同的期望输出。
<div>
<ul>
<ng-container *ngIf="namelist.length; else doElse">
<li
*ngFor="let title of namelist; index as i"
#list
class="some class XYZ"
(click)="selectSomething(title)"
(keydown.enter)="makeSelection(title)"
>
<div
class="some class PQR"
tabindex="0"
(keydown.arrowup)="prev(listElements, i)"
(keydown.arrowdown)="next(listElements, i)"
>
<span class="some class abcd">
{{title}}
</span>
</div>
</li>
</ng-container>
</ul>
</div>