No Code Attached Yet bug
avatar zdenyv
zdenyv
13 Oct 2026

What happened?

In Safari, the footer buttons of the calendar popup (Today, Clear, Close) do nothing. The popup closes, but the button action never runs. Clicking a day in the grid works.

Steps to reproduce:

  1. Open any form with a calendar field in Safari on macOS (e.g. Content → Articles → Edit → Publishing → Start Publishing).
  2. Click the calendar button to open the popup.
  3. Click Today (or Clear).

Version

6.1

Expected result

The field is set to today's date (Today) or emptied (Clear), as in Chrome or Firefox.

Actual result

The popup closes and the field stays unchanged.

System Information

Joomla 6.1.4, PHP 8.5, Safari on macOS. The calendar script is unchanged in 6.2.0, so the bug is still there.

Additional Comments

Cause: #48286 (Calendar keyboard navigation) added _handleFocusOut in calendar.es5.js. It hides the popup on focusout unless relatedTarget is inside the calendar. Safari does not move focus to a <button> on click, so relatedTarget is null. The popup hides on mousedown, before click fires, and the button handler never runs. Day cells work because they react on mousedown.

Because #48286 was merged into 5.4-dev, 5.4.x is probably affected too (not tested).

Workaround we use as a small site-wide script:

document.addEventListener('mousedown', function (ev) {
	if (ev.target.closest && ev.target.closest('.js-calendar button[data-action]')) {
		ev.preventDefault(); // keep focus in the input, so focusout does not fire
	}
}, true);

A fix in core could do the same in the calendar itself (preventDefault() on mousedown for the footer buttons). Another option is to ignore focusout with relatedTarget === null while the pointer is down inside the popup.

avatar zdenyv zdenyv - open - 13 Oct 2026
avatar joomla-cms-bot joomla-cms-bot - change - 13 Oct 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 13 Oct 2026
avatar brianteeman
brianteeman - comment - 14 Oct 2026

confirmed

avatar brianteeman
brianteeman - comment - 14 Oct 2026

confirmed the bug
have not tested the proposed fix

avatar QuyTon QuyTon - change - 15 Oct 2026
Labels Added: bug
avatar QuyTon QuyTon - labeled - 15 Oct 2026
avatar QuyTon
QuyTon - comment - 29 Oct 2026

@zdenyv Please test PR ##48654. Thanks.

Add a Comment

Login with GitHub to post a comment