Open Bug 922524 Opened 11 years ago Updated 2 years ago

Sending tab key event, doesn't move focus, when it is done immediately after the mochitest started

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
macOS
defect

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

Details

In the patch for bug 918258, I was working on a mochitest, named test_bug448987.html.
I had to use a setInterval timer there, namely:
    timer = setInterval(function() {
      if (counter > 10) {
        parent.ok(false, "Too often tried to focus image map, giving up");
        parent.Simpletest.finish();
        return;
      }
      synthesizeKey("VK_TAB", { shiftKey: shiftKeyOn }, window); 
      shiftKeyOn = !shiftKeyOn;
      counter++;
    }, 100);

Because for some reason, sending the tab key doesn't result in a focus move, just after the test is running (hence the retries with a limit of 10 times).

This bug is about figuring out why this is occuring and how it can be fixed.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.