mirror of
https://github.com/moparisthebest/app-UI
synced 2024-12-21 23:18:52 -05:00
fixed bug where scroll wasn't being disabled by "scroll" attribute of view descriptor, fixed bug where event listeners were being lost on child views
This commit is contained in:
parent
245614ed32
commit
db4d649907
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
src/.DS_Store
|
@ -229,12 +229,14 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
|
||||
ViewNavigator.prototype.resetScroller = function() {
|
||||
|
||||
var id = this.contentViewHolder.attr( "id" );
|
||||
var currentViewDescriptor = this.history[ this.history.length-1];
|
||||
|
||||
if ( !this.winPhone ) {
|
||||
if ( this.scroller != null ) {
|
||||
this.scroller.destroy();
|
||||
this.scroller = null;
|
||||
}
|
||||
if ( id && !(this.currentViewDescriptor && this.currentViewDescriptor.scroll == false)) {
|
||||
if ( id && !(currentViewDescriptor && currentViewDescriptor.scroll === false)) {
|
||||
var self = this;
|
||||
setTimeout( function() { self.scroller = new iScroll( id ); }, 10 );
|
||||
//this.scroller = new iScroll( id );
|
||||
@ -259,11 +261,11 @@ ViewNavigator.prototype.animationCompleteHandler = function(removalTarget, heade
|
||||
self.resetScroller();
|
||||
if ( removalTarget ) {
|
||||
removalTarget.unbind( "click" );
|
||||
removalTarget.remove();
|
||||
removalTarget.detach();
|
||||
}
|
||||
if ( headerRemovalTarget ) {
|
||||
headerRemovalTarget.unbind( "click" );
|
||||
headerRemovalTarget.remove();
|
||||
headerRemovalTarget.detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user