Instead of using the more rollup-tolerant config for all files, make the
configuration stricter by default but lower in grunt for yui modules.
This means that manual runs (prechecker) or editor integrations will
flag up the errors as well as grunt.
Also add ignore lines to the core files so that eslint isn't noisy when
not running with grunt.
When the content of a dialogue changes after it is first opened - you need to call centerDialogue()
to make sure it still sits in the middle of the window. In addition this now recalculates the "lockScroll"
so that if you need to scroll down to see all of the dialogue you can do it.
The hideIfOutside function was being too restrictive with the
selector for checking if the event occurred within a menu child
(anchor tag) rather than the menu itself.
Moved setting the aria visiblity of the dialogues from the show
and hide functions into the visibility change handler to stop
multiple calls.
Also made the visibility checker just continue to buffer the elements
it hides, rather than clearning them, on multiple calls.
When you add a module or otherwise cause a Moodle dialogue to appear, this
enables the 'lock scroll' feature (the scrollbar disappears).
On some browsers this causes the width of the viewport to change, which can
cause centered/right-aligned theme elements to move distractingly.
This change temporarily sets body max-width while lock scroll is active.
The YUI notification dialogues will now set the appropriate
aria attributes when they are shown/hidden to allow screen
readers to navigate them correctly.
When the dialogue is shown all background elements will be marked
as hidden while the dialogue is marked as visible to a screen reader.
When the dialogue is closed the modified elements will be reverted
to their previous state and the dialogue will be marked as hidden to
a screen reader.
- Add reset_dirty_state method to formchangechecker. This is useful when used in combination with a modal.
- Modify hide method of sendmessage to reset formchangechecker dirty state on modal close.
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.
This patch changes the behavior of open action menus when using a mouse.
Before this patch when clicking on the page with an open action menu the focus would be
returned to the action menu's call button. This could cause the page to jump when a
mouse user did not close an action menu, scrolled and then tried to perform another
action on the page.
After this patch when clicking the focus will not be returned to the action menu's call button.
The behavior of the script will not be changed when using the keyboard.
The commands div should not be added to the DOM. The version shown in the
dock is different to the standard version in the block, and is manually
added to the dock panel when it is displayed.
The docked version contains additional actions (e.g. the undock button).
The original version of the dock should ideally remain untouched.
Note: A duplicate delegation was discovered when fixing this issue. This
was previosuly not triggered because the watched Node was removed
before the delegation took effect.
Before this patch when dragging and dropping a hidden block it would display as though visible when it was dropped.
This is only a display issue, as a page refresh caused it to be dimmed in its new position.
For pages where there will be significant user interaction in which the
server is not updated, it may be necessary to poll the server periodically
to touch the session.
This makes use of the existing checknet script which was designed for
checking network connectivity but fits into this use-case reasonably well.
Every time you click the move icon, it builds a new dialogue with a list
of drop targets, but it never discards the old ones. Not only does this
fill the DOM with junk, but it also causes Behat tests to fail, since
the old dialogues come first, and are hidden, but contain links with the
same text that you are trying to click.
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.