зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1454123 - Wait a moment after moving toolbox to a window before triggering its menu; r=bgrins
MozReview-Commit-ID: 839Z65WTjpC --HG-- extra : rebase_source : 6452970fd61b9b0057ae2d91e75d84d0f5adee96
This commit is contained in:
Родитель
e1ca7a480d
Коммит
33b5b0ea73
|
@ -29,6 +29,14 @@ add_task(async function() {
|
|||
checkHostType(Toolbox.HostType.SIDE);
|
||||
checkToolboxUI();
|
||||
await toolbox.switchHost(Toolbox.HostType.WINDOW);
|
||||
|
||||
// checkHostType, below, will open the meatball menu to read the "Split
|
||||
// console" menu item label. However, if we've just opened a new window then
|
||||
// on some platforms when we switch focus to the new window we might end up
|
||||
// triggering the auto-close behavior on the menu popup. To avoid that, wait
|
||||
// a moment before querying the menu.
|
||||
await new Promise(resolve => requestIdleCallback(resolve));
|
||||
|
||||
checkHostType(Toolbox.HostType.WINDOW);
|
||||
checkToolboxUI();
|
||||
await toolbox.switchHost(Toolbox.HostType.BOTTOM);
|
||||
|
|
Загрузка…
Ссылка в новой задаче