简体   繁体   中英

Stop Chrome Extension from 'stealing' focus from parent page

My Chrome Extension has a useful toolbar...and of course a popup.

When a user clicks into some websites, the invokes my Extension (by clicking on the toolbar or just click the Extension icon) focus leaves the element on the parent/main page...which can sometimes be undesirable.

Is there a way to stop a Chrome Extension from taking focus? So the cursor remains blinking and/or the main page element stays in focus and a blur event is not triggered?

我采取了另一种方法...因为单击弹出窗口或工具栏之前我知道用户关注的是哪个元素,所以我只需在代码运行后将焦点重新放在该元素上即可...工作得很漂亮...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM