Changeset 171


Ignore:
Timestamp:
05/18/05 19:06:18 (10 years ago)
Author:
gogo
Message:

Fix for #272 - IE throwing exception when trying to delete a control
selection. I don't know why, it even did it when using the browser's
own backspace handler instead of the custom one. Worked around it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r170 r171  
    38333833HTMLArea.prototype.ie_checkBackspace = function() { 
    38343834  var sel = this._getSelection(); 
     3835  if(HTMLArea.is_ie && sel.type == 'Control') 
     3836  { 
     3837    var elm = this._activeElement(sel); 
     3838    elm.parentNode.removeChild(elm); 
     3839    return true; 
     3840  } 
     3841 
     3842  // This bit of code preseves links when you backspace over the 
     3843  // endpoint of the link in IE.  Without it, if you have something like 
     3844  //    link_here | 
     3845  // where | is the cursor, and backspace over the last e, then the link 
     3846  // will de-link, which is a bit tedious 
    38353847  var range = this._createRange(sel); 
    3836  
    3837   // the selection must contain at least some text 
    3838   if (range.text == "undefined") return true; 
    3839  
    3840   // to remove a link (should be done like this?) 
    38413848  var r2 = range.duplicate(); 
    38423849  r2.moveStart("character", -1); 
Note: See TracChangeset for help on using the changeset viewer.