mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-20 04:11:52 +00:00
Modified loadComplete() so that it always fires off the "show" event. The idea here is that calling preventDefault() on a "hide" event shouldn't prevent the "show" event from being dispatched. Calling preventDefault() on the "show" event still prevents the "to" page from becoming the active page.
Removed redundant target delcaration in the <a> live click callback.
This commit is contained in:
parent
25c5d2697a
commit
4882c068b0
1 changed files with 3 additions and 3 deletions
|
|
@ -221,7 +221,8 @@
|
|||
$.mobile.silentScroll( to.data( 'lastScroll' ) );
|
||||
|
||||
//trigger show/hide events, allow preventing focus change through return false
|
||||
if( from.data("page")._trigger("hide", null, {nextPage: to}) !== false && to.data("page")._trigger("show", null, {prevPage: from}) !== false ){
|
||||
from.data("page")._trigger("hide", null, {nextPage: to});
|
||||
if( to.data("page")._trigger("show", null, {prevPage: from}) !== false ){
|
||||
$.mobile.activePage = to;
|
||||
}
|
||||
};
|
||||
|
|
@ -389,8 +390,7 @@
|
|||
//if target attr is specified, it's external, and we mimic _blank... for now
|
||||
target = $this.is( "[target]" ),
|
||||
//if it still starts with a protocol, it's external, or could be :mailto, etc
|
||||
external = target || /^(:?\w+:)/.test( href ) || $this.is( "[rel=external]" ),
|
||||
target = $this.is( "[target]" );
|
||||
external = target || /^(:?\w+:)/.test( href ) || $this.is( "[rel=external]" );
|
||||
|
||||
if( href === '#' ){
|
||||
//for links created purely for interaction - ignore
|
||||
|
|
|
|||
Loading…
Reference in a new issue