- Timestamp:
- 05/11/10 07:31:04 (2 years ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
XinhaCore.js (modified) (3 diffs)
-
modules/InlineStyler/InlineStyler.js (modified) (1 diff)
-
modules/InternetExplorer/InternetExplorer.js (modified) (2 diffs)
-
plugins/TableOperations/TableOperations.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/XinhaCore.js
r1256 r1260 1547 1547 // ._toolbar is for legacy, ._toolBar is better thanks. 1548 1548 this._toolBar = this._toolbar = toolbar; 1549 toolbar.className = "toolbar"; 1550 toolbar.unselectable = "1"; 1549 toolbar.className = "toolbar"; 1551 1550 toolbar.align = this.config.toolbarAlign; 1552 1551 … … 1559 1558 1560 1559 this._createToolbar1(editor, toolbar, tb_objects); 1560 1561 // IE8 is totally retarded, if you click on a toolbar element (eg button) 1562 // and it doesn't have unselectable="on", then it defocuses the editor losing the selection 1563 // so nothing works. Particularly prevalent with TableOperations 1564 function noselect(e) 1565 { 1566 if(e.tagName) e.unselectable = "on"; 1567 if(e.childNodes) 1568 { 1569 for(var i = 0; i < e.childNodes.length; i++) if(e.tagName) noselect(e.childNodes(i)); 1570 } 1571 } 1572 noselect(toolbar); 1573 1574 1561 1575 this._htmlArea.appendChild(toolbar); 1562 1576 … … 3615 3629 editor.sizeEditor(); 3616 3630 } 3617 }); 3631 }); 3618 3632 editor.removeLoadingMessage(); 3619 3633 } -
trunk/modules/InlineStyler/InlineStyler.js
r1165 r1260 112 112 break; 113 113 case "borderWidth": 114 style[i] = val + "px";114 style[i] = val ? val + "px" : '0px'; 115 115 break; 116 116 default: -
trunk/modules/InternetExplorer/InternetExplorer.js
r1259 r1260 363 363 // certainly the buggiest browser in the world and I 364 364 // wonder, God, how can Earth stand it? 365 return range.parentElement(); 365 try 366 { 367 return range.parentElement(); 368 } 369 catch(e) 370 { 371 return this._doc.body; // ?? 372 } 373 366 374 case "Control": 367 375 return range.item(0); … … 448 456 * @returns Range 449 457 */ 450 Xinha.prototype.saveSelection = function( )451 { 452 return this.createRange( this.getSelection())458 Xinha.prototype.saveSelection = function(sel) 459 { 460 return this.createRange(sel ? sel : this.getSelection()) 453 461 } 454 462 /** -
trunk/plugins/TableOperations/TableOperations.js
r1075 r1260 535 535 table.summary = val; 536 536 break; 537 case "width":538 table.style.width = ("" + val) + params.f_unit;539 break;540 537 case "align": 541 538 table.align = val;
