src/cm/media/js/client/c_sync.js
changeset 525 89ef5ed3c48b
parent 501 5cd02f32be5e
child 532 0bad3613f59d
--- a/src/cm/media/js/client/c_sync.js	Mon Jul 15 15:25:58 2013 +0200
+++ b/src/cm/media/js/client/c_sync.js	Tue Jul 16 14:29:46 2013 +0200
@@ -387,9 +387,9 @@
       var topAncestorComment = path[path.length - 1] ;
       var topY = 0 ;
       if (comment['start_wrapper'] != -1) 
-        topY = CY.get(".c-id-"+topAncestorComment.id).getY() ;
+        topY = CY.one(".c-id-"+topAncestorComment.id).getY() ;
       else 
-        topY = CY.get('document').get('scrollTop') ;
+        topY = CY.one('document').get('scrollTop') ;
       
       this._showComments([topAncestorComment.id], topY, false) ;
       // optim when browsing comments with no reply     
@@ -401,9 +401,9 @@
     if (topComment != null) {
       var topY = 0 ;
       if (topComment['start_wrapper'] != -1) 
-        topY = CY.get(".c-id-"+topComment.id).getY() ;
+        topY = CY.one(".c-id-"+topComment.id).getY() ;
       else 
-        topY = CY.get('document').get('scrollTop') ;
+        topY = CY.one('document').get('scrollTop') ;
       
       this._showComments([topComment.id], topY, false) ;
       // optim when browsing comments with no reply     
@@ -444,11 +444,11 @@
   
         if (commentDbIds.length > 0) {
           if (atDocumentTop) {
-            CY.get('document').set('scrollTop', 0) ; 
+            CY.one('document').set('scrollTop', 0) ; 
           }
           else {
             gIComments.activate(commentDbIds[0]) ;
-            var scopeStart = CY.get(".c-id-"+commentDbIds[0]) ;
+            var scopeStart = CY.one(".c-id-"+commentDbIds[0]) ;
             if (scopeStart && !scopeStart.inViewportRegion()) { // scopeStart could be null when comment has no scope
               scopeStart.scrollIntoView(true) ;
               // Since scrollIntoView scroll the embed ifram *and* the parent window