Frédéric Massart found this when testing
MDL-43089. If (due to an Ajax call say) the contents of a dialogue changes a lot, you may want to change the fully-screen-ness, or whether the page scroll bars are available.
I think the right way to handle this is for the dialogue subclass that is changing the content to fire a widget:contentUpdate event, and then moodle-core-notification base class subscribe to that, and re-do some of the logic from visibilityChanged.
For now, in my code, I have done a short-term hack of
but you probably want to fix this properly at some point.