mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
When a YUI dialogue was opened, it was focusing on the boundingBox, with the browser moving the scroll position to focus on the top of the boundingBox. This caused a jump. This only happens when the dialogue is modal and consequentially has a maskNode present as it changes the initial positioning behaviour of the boundingBox. To avoid this, when the maskNode is shown, the dialogue is position at 0,0 in the current viewport. For centered dialogues, the dialogue is automatically re-positioned after the window has shown. For non-centered dialogues, the original position is stored and the dialogue is restored to that position after it has been displayed. This should not interfere with use of the align function as this will be called later in the proceedings, after the show has run.