aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-29 13:48:11 -0800
committerNivesh Rajbhandari2012-02-29 13:48:11 -0800
commit0cd17b6cf9231e60083958d85759d4796f505342 (patch)
tree7f00529022ac7bbbee4b91716555d5fad5823b24 /js
parent7a259f8c78a2394e32c62654623285ee595c6249 (diff)
downloadninja-0cd17b6cf9231e60083958d85759d4796f505342.tar.gz
Fix for selection bug due to bad scrollLeft and scrollTop values when switching between documents.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/document/html-document.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 9dcea8cb..581bbc08 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -719,15 +719,14 @@ exports.HTMLDocument = Montage.create(TextDocument, {
719 719
720 720
721 721
722 if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){ 722 if((this.savedLeftScroll !== null) && (this.savedTopScroll !== null)){
723 this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll; 723 this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll;
724 this.application.ninja.stage._scrollLeft = this.savedLeftScroll;
725 this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll; 724 this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll;
726 this.application.ninja.stage._scrollLeft = this.savedTopScroll; 725 this.application.ninja.stage.handleScroll();
727 } 726 }
728 727
729 this.application.ninja.currentSelectedContainer = this.documentRoot; 728 this.application.ninja.currentSelectedContainer = this.documentRoot;
730 if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){ 729 if(!this.selectionModel){
731 this.application.ninja.selectedElements = this.selectionModel.slice(0); 730 this.application.ninja.selectedElements = this.selectionModel.slice(0);
732 } 731 }
733 732