有没有办法检测 LastPass 扩展是否在网站上工作(在 React 中)

Is there a way to detect if the LastPass extension is working on the website (in React)

我有一个带有眼睛符号的密码输入来显示文本,它工作正常,但是,它恰好位于 LastPass 盒子放置的时候。

我的目标是在扩展程序打开时将眼睛符号向左移动一点,但我不想完全禁用它因为它很有用并且其他原因。

当前行为:

预期行为:

有没有办法检测到这样的事情?

更新 类似于 material-ui 中的内容:https://material-ui.com/components/text-fields/#input-adornments

因此,由于我没有得到任何答案,所以我采用了@cbr 的解决方案,即 trim 输入宽度并使其看起来像眼睛在输入中。