Commit 1837133c authored by Jono Mingard's avatar Jono Mingard Committed by Robert Lyon
Browse files

Use focus management when in-page tabs are loaded with JS (Bug #1262911)



In /artefact/internal/index.php and /skin/design.php the in-page tabs now
focus their first focusable child when the current tab is changed. Using
jQuery since MochiKit doesn't have an easy way to select all input-like
elements.

Change-Id: I1af75a9fb7464ad3bf2583e169d6f97a9605f688
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 18bf71b1
......@@ -37,6 +37,7 @@ addLoadEvent(function() {
removeElementClass(fieldset, 'safe-hidden');
removeElementClass(fieldset, 'collapsed');
fieldset.tabAccessibleText.innerHTML = '(' + get_string('tab') + ' ' + get_string('selected') + ')';
$j(fieldset).find(':input').first().focus();
$('profileform_fs').value = fsid;
}
else if (hasElementClass(fieldset.tabLink.parentNode, 'current-tab')) {
......
......@@ -34,6 +34,7 @@ addLoadEvent(function() {
removeElementClass(fieldset, 'safe-hidden');
removeElementClass(fieldset, 'collapsed');
fieldset.tabAccessibleText.innerHTML = '(' + get_string('tab') + ' ' + get_string('selected') + ')';
$j(fieldset).find(':input').first().focus();
$('designskinform_fs').value = fsid;
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment