1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-13 20:42:22 +02:00
Andrew Nicols d247a50113 MDL-47734 core: Prevent jumping of YUI dialogues
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.
2014-10-23 14:44:14 +08:00
..