Chrome Extension - first link is auto-focused in popup

后端 未结 6 1288
感动是毒
感动是毒 2021-02-07 11:18

How do I stop my Google Chrome extension\'s default action to auto-focus the first link in my popup.html? I know I could probably do some roundabout hack with JS o

6条回答
  •  不思量自难忘°
    2021-02-07 11:45

    The easiest (and javascript free!) way is to simply add tabindex="-1" to any element which you don't want to receive automatic focus.

提交回复
热议问题