From 0cd17b6cf9231e60083958d85759d4796f505342 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 29 Feb 2012 13:48:11 -0800 Subject: Fix for selection bug due to bad scrollLeft and scrollTop values when switching between documents. Signed-off-by: Nivesh Rajbhandari --- js/document/html-document.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'js') 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, { - if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){ + if((this.savedLeftScroll !== null) && (this.savedTopScroll !== null)){ this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll; - this.application.ninja.stage._scrollLeft = this.savedLeftScroll; this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll; - this.application.ninja.stage._scrollLeft = this.savedTopScroll; + this.application.ninja.stage.handleScroll(); } this.application.ninja.currentSelectedContainer = this.documentRoot; - if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){ + if(!this.selectionModel){ this.application.ninja.selectedElements = this.selectionModel.slice(0); } -- cgit v1.2.3