Ticket #656: _selectionEmpty.patch
| File _selectionEmpty.patch, 0.9 kB (added by mokhet, 6 years ago) |
|---|
-
htmlarea.js
2990 2990 }; 2991 2991 2992 2992 2993 HTMLArea.prototype._selectionEmpty = function(sel)2993 if(HTMLArea.is_ie) 2994 2994 { 2995 if(!sel) return true; 2995 HTMLArea.prototype._selectionEmpty = function(sel) 2996 { 2997 if(!sel) return true; 2996 2998 2997 if(HTMLArea.is_ie)2998 {2999 2999 return this._createRange(sel).htmlText == ''; 3000 } 3001 else if(typeof sel.isCollapsed != 'undefined') 3000 }; 3001 } 3002 else 3003 { 3004 HTMLArea.prototype._selectionEmpty = function(sel) 3002 3005 { 3003 return sel.isCollapsed; 3004 } 3006 if(!sel) return true; 3005 3007 3006 return true; 3007 }; 3008 if(typeof sel.isCollapsed != 'undefined') 3009 { 3010 return sel.isCollapsed; 3011 } 3008 3012 3013 return true; 3014 }; 3015 } 3016 3009 3017 HTMLArea.prototype._getAncestorBlock = function(sel) 3010 3018 { 3011 3019 // Scan upwards to find a block level element that we can change or apply to
