Does panel hide get called no matter how XD exits?

Does a panel’s hide entry get called if the panel is open and the user quits out of XD? I would presume so, but just want to make sure. (Since XD is quitting, I can’t see the console.log() to verify.)

(So I can put pref loading/unloading in panel show/hide, and make them async to boot…)

@peterflynn – Do you remember the behavior here?

Do you mean the hide() method?

Right, sorry, hide.

On Mac hide() is not called on closing the document nor on quitting XD. It seems instead that on Windows it’s being called if you close the document.

Thanks, that confirms what I suspected.

@stevekwak Wouldn’t the different behavior on macOS/Windows be considered a bug?

It’d sure be great to have hide() called reliably no matter how the panel is hidden (user plugins UI (switching back to listing), document close, XD quit).

1 Like

Would it be better to have a close method specifically for this purpose?