an early attempt to fix #2273

I was not able to test this though
preserves initial strategy that uses original cell as cell B
so as to preserve selection
pull/2349/head
Thierry Parmentelat 9 years ago
parent e9c9c3a10e
commit 6aaa4d7a96

@ -1697,11 +1697,16 @@ define([
if (cell.is_splittable()) {
var texta = cell.get_pre_cursor();
var textb = cell.get_post_cursor();
// current cell becomes the second one
// so we don't need to worry about selection
cell.set_text(textb);
// create new cell with same type
var new_cell = this.insert_cell_above(cell.cell_type);
// Unrender the new cell so we can call set_text.
new_cell.unrender();
new_cell.set_text(texta);
// duplicate metadata
new_cell.metadata = JSON.parse(JSON.stringify(cell.metadata));
}
};

Loading…
Cancel
Save