This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Provide Option to focus on page #1909
Closed
Description
It would be nice if you could decide for your own code page by page whether you want it to do this auto focus logic.
//direct focus to the page title, or otherwise first focusable element
function reFocus( page ) {
var lastClicked = page.jqmData( "lastClicked" );
if( lastClicked && lastClicked.length ) {
lastClicked.focus();
}
else {
var pageTitle = page.find( ".ui-title:eq(0)" );
if( pageTitle.length ) {
pageTitle.focus();
}
else{
page.find( focusable ).eq( 0 ).focus();
}
}
}
Metadata
Metadata
Assignees
Labels
No labels