/*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
// inside a selection. We don't want to capture that.\r
body.on( 'mousedown', disableSave );\r
body.on( 'mouseup',\r
- function( evt )\r
+ function()\r
{\r
- // IE context-menu event in table cells collapse\r
- // whatever selection is, avoiding saving this\r
- // 'wrong' snapshot.(#3001)\r
- evt = evt.data;\r
- if ( evt.$.button == 2 && evt.getTarget().hasAscendant( 'table' ) )\r
- return;\r
-\r
saveEnabled = true;\r
setTimeout( function()\r
{\r
return this;\r
},\r
\r
+ getCommonAncestor : function()\r
+ {\r
+ var ranges = this.getRanges(),\r
+ startNode = ranges[ 0 ].startContainer,\r
+ endNode = ranges[ ranges.length - 1 ].endContainer;\r
+ return startNode.getCommonAncestor( endNode );\r
+ },\r
+\r
// Moving scroll bar to the current selection's start position.\r
scrollIntoView : function()\r
{\r