Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Conversation

gabrielschulhof
Copy link

pagecontainer no longer depends on transitions, providing instant page changes only. Nevertheless, a new extension, pagecontainer.transitions implements page change via transition. Transitions no longer need navigation, because $.mobile.focusPage() is moved to helpers and because they now receive the scrollTo position from whoever initiates the transition, rather than retrieving it themeselves from $.mobile.navigate.history

Fixes gh-6929
Fixes gh-4022
Fixes gh-7158

Gabriel Schulhof added 5 commits January 28, 2015 15:33
Do not assume that calling $.mobile.initializePage() results in a synchronous
call to resetActivePageHeight(), because resetActivePageHeight() gets called
from a pageshow handler, which may be asynchronous, depending on the
implementation of the transition handler for the "none" transition.
This avoids dependence on navigation history
@gabrielschulhof gabrielschulhof force-pushed the 4022-separate-pagecontainer-and-transitions branch from c3c5727 to 46002cf Compare January 28, 2015 13:34
@gabrielschulhof gabrielschulhof deleted the 4022-separate-pagecontainer-and-transitions branch March 23, 2015 13:24
@gabrielschulhof gabrielschulhof restored the 4022-separate-pagecontainer-and-transitions branch March 23, 2015 14:02
// Direct focus to the page title, or otherwise first focusable element
focusPage: function( page ) {
var autofocus = page.find( "[autofocus]" ),
pageTitle = page.find( ".ui-title:eq(0)" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets just set the var here, and do the find later don't need to needlessly search the whole page if we already found an autofocus element.

@arschmitz
Copy link
Contributor

ok so aside from those couple things i think this looks good

@arschmitz
Copy link
Contributor

@gabrielschulhof if you can fix that one minor thing and rebase 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.