Ver código fonte

Fix cell drop order

Steven Silvester 8 anos atrás
pai
commit
d1cce554ff
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/notebook/widget.ts

+ 2 - 2
src/notebook/widget.ts

@@ -1262,10 +1262,10 @@ class Notebook extends StaticNotebook {
         value = factory.createRawCell({ cell });
         break;
       }
-      model.cells.insert(index, value);
+      model.cells.insert(index++, value);
     });
     // Activate the last cell.
-    this.activeCellIndex = index + values.length - 1;
+    this.activeCellIndex = index - 1;
   }
 
   /**