Changeset 455 for trunk


Ignore:
Timestamp:
01/19/06 00:05:11 (14 years ago)
Author:
mokhet
Message:

apply selectNodeContents patch from ticket #656 and fix BSD-style bracing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r454 r455  
    32453245 
    32463246// Selects the contents inside the given node 
    3247 HTMLArea.prototype.selectNodeContents = function(node, pos) { 
    3248   this.focusEditor(); 
    3249   this.forceRedraw(); 
    3250   var range; 
    3251   var collapsed = typeof pos == "undefined" ? true : false; 
    3252   if (HTMLArea.is_ie) { 
     3247if (HTMLArea.is_ie) 
     3248{ 
     3249  HTMLArea.prototype.selectNodeContents = function(node, pos) 
     3250  { 
     3251    this.focusEditor(); 
     3252    this.forceRedraw(); 
     3253    var range; 
     3254    var collapsed = typeof pos == "undefined" ? true : false; 
    32533255    // Tables and Images get selected as "objects" rather than the text contents 
    32543256    if(collapsed && node.tagName && node.tagName.toLowerCase().match(/table|img|input|select|textarea/)) 
     
    32643266    } 
    32653267    range.select(); 
    3266   } else { 
     3268  }; 
     3269} 
     3270else 
     3271{ 
     3272  HTMLArea.prototype.selectNodeContents = function(node, pos) 
     3273  { 
     3274    this.focusEditor(); 
     3275    this.forceRedraw(); 
     3276    var range; 
     3277    var collapsed = typeof pos == "undefined" ? true : false; 
    32673278    var sel = this._getSelection(); 
    32683279    range = this._doc.createRange(); 
     
    32793290    sel.removeAllRanges(); 
    32803291    sel.addRange(range); 
    3281   } 
    3282 }; 
     3292  }; 
     3293} 
    32833294 
    32843295/** Call this function to insert HTML code at the current position.  It deletes 
Note: See TracChangeset for help on using the changeset viewer.