Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer

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

Alla svar (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.