Chrome Extension - first link is auto-focused in popup

后端 未结 6 1284
感动是毒
感动是毒 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:56

    tabindex="-1" worked for me. I was adding autofocus to an input and it didn't work until I used this tabindex="-1" attribute for each link before the input.

    Strange to say the least.

提交回复
热议问题