src/cm/media/js/client/c_sync.js
changeset 532 0bad3613f59d
parent 525 89ef5ed3c48b
child 553 bf26fb47a14c
--- a/src/cm/media/js/client/c_sync.js	Thu Sep 05 14:08:31 2013 +0200
+++ b/src/cm/media/js/client/c_sync.js	Wed Sep 11 23:13:01 2013 +0200
@@ -387,9 +387,9 @@
       var topAncestorComment = path[path.length - 1] ;
       var topY = 0 ;
       if (comment['start_wrapper'] != -1) 
-        topY = CY.one(".c-id-"+topAncestorComment.id).getY() ;
+        topY = CY.get(".c-id-"+topAncestorComment.id).getY() ;
       else 
-        topY = CY.one('document').get('scrollTop') ;
+        topY = CY.get('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.one(".c-id-"+topComment.id).getY() ;
+        topY = CY.get(".c-id-"+topComment.id).getY() ;
       else 
-        topY = CY.one('document').get('scrollTop') ;
+        topY = CY.get('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.one('document').set('scrollTop', 0) ; 
+            CY.get('document').set('scrollTop', 0) ; 
           }
           else {
             gIComments.activate(commentDbIds[0]) ;
-            var scopeStart = CY.one(".c-id-"+commentDbIds[0]) ;
+            var scopeStart = CY.get(".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