Changeset 1051 for trunk/modules/WebKit


Ignore:
Timestamp:
10/03/08 19:03:48 (11 years ago)
Author:
ray
Message:

#1224 sevenbitclean / ghost cursor error with html mode toggle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/WebKit/WebKit.js

    r1044 r1051  
    723723}; 
    724724 
    725 Xinha.prototype.cc = String.fromCharCode(8286);  
     725Xinha.cc = String.fromCharCode(8286);  
    726726 
    727727Xinha.prototype.setCC = function ( target ) 
    728728{ 
    729   var cc = this.cc; 
     729  var cc = Xinha.cc; 
    730730  try 
    731731  { 
     
    757757Xinha.prototype.findCC = function ( target ) 
    758758{ 
     759  var cc = Xinha.cc; 
     760   
    759761  if ( target == 'textarea' ) 
    760762  { 
    761763  var ta = this._textArea; 
    762   var pos = ta.value.indexOf( this.cc ); 
     764  var pos = ta.value.indexOf( cc ); 
    763765  if ( pos == -1 ) return; 
    764   var end = pos + this.cc.length; 
     766  var end = pos + cc.length; 
    765767  var before =  ta.value.substring( 0, pos ); 
    766768  var after = ta.value.substring( end, ta.value.length ); 
     
    784786    { 
    785787      var doc = this._doc;  
    786       doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp(this.cc),'<span id="XinhaEditingPostion"></span>'); 
     788      doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp(cc),'<span id="XinhaEditingPostion"></span>'); 
    787789      var posEl = doc.getElementById('XinhaEditingPostion'); 
    788790      this.selectNodeContents(posEl); 
Note: See TracChangeset for help on using the changeset viewer.