?
Referenced as Pull Request for: # 8723
avatar brianteeman
brianteeman
15 Dec 2015

Using Chrome or Safari load the admin login page and their is focus on the Login field

BUT use firefox (tested on MAC) and there is no focus

Apparently this is a bug that used to exist and was fixed but has come back again

avatar brianteeman brianteeman - open - 15 Dec 2015
avatar justinherrin
justinherrin - comment - 15 Dec 2015

Confirmed that this happens on the Admin login page.

The autofocus does work just fine in Firefox (on Mac) on a frontend login page and when viewing a page with the login module on it.

avatar brianteeman
brianteeman - comment - 16 Dec 2015

Googling it suggests that the attribute autofocus=true does not work in firefox and that focus should be done using javascript


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8695.

avatar bertmert
bertmert - comment - 16 Dec 2015

Reason is JHtml::_('behavior.noframes');
and line

$document->addStyleDeclaration('html { display:none }');

EDIT: or the way like JS shows the HTML.

Without this line, that hides whole HTML before JS shows it, the field gets the focus like expected.

Adding script to loginform that tries to set a focus on an input doesn't work with this line active
neither inside

$(window).load(function(){
 ....focus();

nor inside

$(document).ready(function(){
 ....focus();

.

avatar bertmert
bertmert - comment - 17 Dec 2015

Please test PR #8723

avatar brianteeman brianteeman - change - 17 Dec 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-12-17 18:49:35
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 17 Dec 2015

Closed as we have a PR - thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8695.

avatar brianteeman brianteeman - close - 17 Dec 2015

Add a Comment

Login with GitHub to post a comment