mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
821f2a390c
There is a difference in the behaviour of the calendar block when it is on the calendar page and when it is not. On the calendar page, when the user clicks on the date or link next/previous month or day name in the calendar block, it will have the effect of changing the URL, which should not happen. The patch also includes hiding popover after the user clicks the day number. When the user clicks on the date or is focused on the date and then presses enter on the keyboard, the popover does not automatically close. To fix this, I added an event type, "click", to be attached to the hidePopover function and added conditioning to the target element when there was a "click" event. An additional step was added to the Behat calendar for the click event to ease the testing process. For the popover, I set the "animation" to false to avoid the random Behat failure caused by the slow animation.