IE 11“ tabindex”问题。必须按两次Tab键以进入角度7

问题描述 投票:0回答:1
的下一个输入

它在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>
angular typescript internet-explorer angular7 tabindex
1个回答
0
投票

我试图创建一个示例Angular项目,并添加了一些带有选项卡索引的文本框。根据我的测试结果,我发现它在IE 11浏览器中运行正常。

这是我的测试结果。

enter image description here

您只需按一下Tab键就可以看到光标移至下一个控件。我建议您创建一个新的示例项目并在其中测试此问题。

如果运行正常,那么您的原始项目可能会出现问题。它可以帮助您缩小问题范围,并有助于查找导致此问题的原因。

© www.soinside.com 2019 - 2024. All rights reserved.