Closed Bug 1591922 Opened 5 years ago Closed 5 years ago

Page.bringToFront has to wait for activate and focus events for the browser window

Categories

(Remote Protocol :: CDP, defect, P1)

defect

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

With bug 1535102 we got a basic implementation of focusing the browser window. Sadly it doesn't take into account that this action is asynchronously.

To not cause a race condition when switching between browser windows, the activate and focus events have to be waited for. Here code from Marionette which could partly be re-used:

https://searchfox.org/mozilla-central/rev/74cc0f4dce444fe0757e2a6b8307d19e4d0e0212/testing/marionette/browser.js#349-357

Actually Page.bringToFront() should not focus the browser window, but only activate the tab which means it brings it to front. Instead Target.activateTarget() as to be implemented on bug 1548594 has to actually do the focusing.

As such I will take care of this race over on bug 1548594.

Depends on: 1548594

Sorry, I meant bug 1592643, which is the real implementation bug.

Depends on: 1592643
No longer depends on: 1548594
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P3 → P1
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f2ade55c9d2c [remote] Page.bringToFront has to wait for activate and focus events. r=remote-protocol-reviewers,ato
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
Component: CDP: Page → CDP
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: