Semantic-Org/Semantic-UI-React

Dropdown: incorrect focus

Open

#2,046 建立於 2017年9月4日

在 GitHub 查看
 (15 留言) (0 反應) (0 負責人)JavaScript (4,065 fork)batch import
bughelp wanted

倉庫指標

Star
 (13,136 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

This applies to use in Chrome.

Testcase https://react.semantic-ui.com/modules/dropdown#dropdown-example-open-on-focus

Steps to Reproduce

  1. Click on the down arrow (NOT on the text of the drop-down) of the second dropdown
  2. Click on the down arrow again
  3. Press 'shift + tab' to navigate to the first dropdown

Expected The first dropdown should now have the focus

Result The second dropdown retains the focus.

** FIX ** This is because when clicking on the down arrow, its the <i ../> element that obtains the focus.

Applying the style pointer-events: none; to the <i .../> element resolves the issue, when the down arrow is clicked focus is passed through to the dropdown component as expected.

貢獻者指南