?
avatar Bakual
Bakual
30 Oct 2017

Steps to reproduce the issue

Try to navigate through a form using the TAB key with Internet Explorer 11

Expected result

Jump from one field to the next through whole form

Actual result

Works until you hit the first calendar field. When you tab out of the input field the focus vanishes. Next tab brings you to the first link of the page (eg the main menu).
Tabbing further will work again till it again comes to the same calendar field and then jumps back to the top. Everything "behind" the calendar is not accessible using the TAB key. Not even the calendar icon that activates the popup)

System information (as much as possible)

That's on Internet Epxlorer 11 (on Windows 7).
Chrome works fine.

Additional comments

I guess that is due to some JS fallback code for IE11. Pinging @dgt41 as he may have a clue.

avatar Bakual Bakual - open - 30 Oct 2017
avatar joomla-cms-bot joomla-cms-bot - change - 30 Oct 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Oct 2017
avatar dgt41
dgt41 - comment - 30 Oct 2017

Actually I can replicate this in other browsers. I have a feeling that we're missing something on the input blur, because if you tab till the calendar icon, open the calendar and close it through the close button, the tab order is correct. I suspect that we need to remove the listener for keydown on the input blur as well...

avatar Bakual
Bakual - comment - 30 Oct 2017

Which other browsers don't work for you? I tried with Chrome and Firefox and they both work fine, that's why I thought it's IE11 specific.
As for the solution, I have no clue ?

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Oct 2017
Category JavaScript UI/UX
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Oct 2017
Status New Discussion
avatar dgt41
dgt41 - comment - 30 Oct 2017

Safari ?

avatar dgt41
dgt41 - comment - 30 Oct 2017

@Bakual remove line 254

avatar Bakual
Bakual - comment - 30 Oct 2017

Ah I heard about Safari being the new IE ?
Line 254 in which file?

avatar dgt41
dgt41 - comment - 30 Oct 2017

media/system/js/fields/calendar.js

avatar Bakual
Bakual - comment - 31 Oct 2017

Yes, deleting that line document.activeElement.blur(); did fix it for me (tested with Edge on Win10 now).
Selecting a value using the keyboard also worked.

What didn't work was when I clicked the "Close" button with the keyboard. Then the focus again goes back to the top. But I think that's a different issue.

Do you want to make a PR?

avatar dgt41
dgt41 - comment - 31 Oct 2017

What didn't work was when I clicked the "Close" button with the keyboard. Then the focus again goes back to the top. But I think that's a different issue.

So that solves the mystery what the heck was I thinking when adding that line?. So the solution should not be removing this line rather executing it only if the active element IS the input field, something like

if (document.activeElement !== inputField) {
    inputField.blur();
}
avatar Bakual
Bakual - comment - 31 Oct 2017

Sorry, I meant "when I clicked the "Close" button with the mouse.".
Also I was wrong about selecting a value using the keyboard. While I can move the selection, and close the popup again with enter, the selected value isn't "taken".

But those issues exists with or without that line 254, so they are different issues. And I'm not even sure if keyboard has to work in the popup. After all, keyboard users likely don't use the popup anyway, I guess they enter the value directly into the input field to begin with.

Personally I'm fine with removing the line as it restores tabbing and solves this issue.
Can you do the PR?

avatar Bakual
Bakual - comment - 2 Nov 2017

@dgt41 Do you intend to do a PR or shall I do it myself?

avatar Bakual
Bakual - comment - 6 Nov 2017

I've created a PR with the suggested change. Closing since we have a PR #18508

avatar Bakual Bakual - change - 6 Nov 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-11-06 10:06:40
Closed_By Bakual
avatar Bakual Bakual - close - 6 Nov 2017

Add a Comment

Login with GitHub to post a comment