为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Changing textfield value does not trigger events when window is unfocused

more options

Hi,

I'm using Selenium Webdriver to test in Firefox, and I started encountering some strange behavior that I was hoping to get some more information about.

What should happen: 1. Text field gets filled with some value 2. On focus leaving the field (click away or tab), a label on the same page should be updated based on the value from the text field

Manually, this works just fine. When using Selenium Webdriver and the Firefox main window isn't focused/active (let's say, behind a terminal window), the event on focus-change does not fire, and the label does not get updated. In Chrome, this seems to work fine.

Do you have any idea what might be triggering different behavior based on the Firefox window being active?

Thanks, Connor

Hi, I'm using Selenium Webdriver to test in Firefox, and I started encountering some strange behavior that I was hoping to get some more information about. What should happen: 1. Text field gets filled with some value 2. On focus leaving the field (click away or tab), a label on the same page should be updated based on the value from the text field Manually, this works just fine. When using Selenium Webdriver and the Firefox main window isn't focused/active (let's say, behind a terminal window), the event on focus-change does not fire, and the label does not get updated. In Chrome, this seems to work fine. Do you have any idea what might be triggering different behavior based on the Firefox window being active? Thanks, Connor

所有回复 (1)

more options

Hi Connor, I'm not a Selenium user and this might not be the best place to get support for this issue.

Is this a new issue in Firefox 42 or can you determine when it started? Does it persist in Firefox 45?

Does Firefox's Browser Console show any error messages when you "tab" out of the field in a background window that it does not show when you "tab" out of the field in a focused window?

Firefox does have a concept of trusted vs. untrusted keyboard events, but I don't know whether the window being active vs. not active is a consideration.