*************** *** 2178,2195 **** { *aCancel = PR_TRUE; return NS_OK; } // dont cross table boundaries PRBool bInDifTblElems; res = InDifferentTableElements(leftNode, rightNode, &bInDifTblElems); - if (NS_FAILED(res) || bInDifTblElems) return res; - // find the relavent blocks if (IsBlockNode(leftNode)) leftParent = leftNode; else leftParent = mHTMLEditor->GetBlockNodeParent(leftNode); if (IsBlockNode(rightNode)) rightParent = rightNode; else --- 2178,2198 ---- { *aCancel = PR_TRUE; return NS_OK; } // dont cross table boundaries PRBool bInDifTblElems; res = InDifferentTableElements(leftNode, rightNode, &bInDifTblElems); + if (NS_FAILED(res) || bInDifTblElems) + { + *aCancel = PR_TRUE; // Indicating that the operation has to stopped when we are crossing the table + return res; // cell boundary. + } // find the relavent blocks if (IsBlockNode(leftNode)) leftParent = leftNode; else leftParent = mHTMLEditor->GetBlockNodeParent(leftNode); if (IsBlockNode(rightNode)) rightParent = rightNode; else