Hiding widget causes error

I'm trying to hide the container that contains my CesiumWidget (using jQuery.hide()); however, when I do this I get:

Developer Error: canvasDimensions.x must be greater than zero.

Is this a bug or something I'm doing wrong? Or is there a better way I should go about what I'm trying to accomplish (i.e. hide the map if a user clicks on a button).

For what it’s worth, I consider this a bug. The most common way to hide something on the web is display: none; and we respond to this by throwing a DeveloperError for a zero-height canvas, and crashing the requestAnimationFrame loop. I don’t know if there’s an issue open for this though. Take a look around and feel free to open a new one.

–Ed.