Ticket #6112: editorScroll_strictMode.patch

File editorScroll_strictMode.patch, 0.9 kB (added by peller, 10 months ago)

patch from Mehmet Akin (IBM)

  • C:/ibmDojo/workspace/dojotoolkit/dijit/_editor/RichText.js

     
    845845                        dijit.focus(this.iframe); 
    846846                }else if(this.editNode && this.editNode.focus){ 
    847847                        // editNode may be hidden in display:none div, lets just punt in this case 
    848                         this.editNode.focus(); 
     848                        //this.editNode.focus(); -> causes IE to scroll always (strict and quirks mode) to the top the Iframe 
     849                        // if we fire the event manually and let the browser handle the focusing, the latest  
     850                        // cursor position is focused like in FF                         
     851                        this.iframe.fireEvent('onfocus', document.createEventObject()); // createEventObject only in IE 
    849852//              }else{ 
    850853// TODO: should we throw here? 
    851854//                      console.debug("Have no idea how to focus into the editor!");