Changeset 998 for trunk/modules/Gecko


Ignore:
Timestamp:
05/01/08 12:33:36 (11 years ago)
Author:
ray
Message:
  • #1201 Add inwardHtml/outwardHtml functions to Config object
  • Improved method for finding editing position in Gecko/Webkit?
File:
1 edited

Legend:

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

    r981 r998  
    782782    try 
    783783    { 
    784       this._iframe.contentWindow.find( this.cc ); 
    785       var sel = this.getSelection(); 
    786       sel.getRangeAt(0).deleteContents(); 
    787       this.scrollToElement(); 
     784      var doc = this._doc;  
     785      doc.body.innerHTML = doc.body.innerHTML.replace(new RegExp(this.cc),'<span id="XinhaEditingPostion"></span>'); 
     786      var posEl = doc.getElementById('XinhaEditingPostion'); 
     787      this.selectNodeContents(posEl); 
     788      posEl.scrollIntoView(true); 
     789      posEl.parentNode.removeChild(posEl); 
     790 
    788791      this._iframe.contentWindow.focus(); 
    789792    } catch (e) {} 
Note: See TracChangeset for help on using the changeset viewer.