Index: trunk/extensions/VisualEditor/modules/es/models/es.DocumentModel.js |
— | — | @@ -1033,14 +1033,10 @@ |
1034 | 1034 | // casing merging a listitem into a paragraph. |
1035 | 1035 | |
1036 | 1036 | // wait, some nodes don't have types? Is this the top document node? |
1037 | | - return ( |
1038 | | - ( |
1039 | | - ( node1 && node2 ) && |
1040 | | - ( node1.type !== undefined && node2.type !== undefined ) && |
1041 | | - ( node1.type === node2.type ) |
1042 | | - ) && |
1043 | | - ( node1.getParent() === node2.getParent() ) |
1044 | | - ); |
| 1037 | + return ( |
| 1038 | + ( ( node1 && node2 ) && ( node1.getElementType() === node2.getElementType() ) ) && |
| 1039 | + ( node1.getParent() === node2.getParent() ) |
| 1040 | + ); |
1045 | 1041 | } |
1046 | 1042 | |
1047 | 1043 | function mergeDelete( range, tx ) { |