Bug #25: Flyout will only show if Sidebar has focus. If you show
the Flyout via "System.Gadget.Flyout.show = true" and Sidebar
doesn't have focus, the "System.Gadget.Flyout.onHide" event immediately
fires.
Added to the known bugs list with a Repro. I expect it's by design, but there's no mention of it in the MSDN documentation so I'm classing it as a bug. Firing the onHide event immediately could cause code issues, as any code relying on the Flyout body would fail.
To catch onHide event misfires, check if the Flyout body is null:
function onHideEvent() {
//did the Flyout actually open
if (System.Gadget.Flyout.document.parentWindow.body == null)
return;
//the Flyout was open.
}

Bug #25: Flyout will only show if Sidebar has focus.
ClaudiaHelpOnVSTO
alecb
I thought about posting this as a bug, too, but thought it was by design. I think MS's point of view is that Gadgets could be pretty annoying if they popped up with a flyout all of a sudden.
Andy
b.p.