Ticket #6112: 6112.patch

File 6112.patch, 1.5 kB (added by liucougar, 10 months ago)

patch to fix the issue

  • _base/focus.js

     
    182182                        targetWindow = window; 
    183183                } 
    184184 
    185                 dojo.connect(targetWindow.document, "onmousedown", null, function(evt){ 
    186                         dijit._justMouseDowned = true; 
    187                         setTimeout(function(){ dijit._justMouseDowned = false; }, 0); 
    188                         dijit._onTouchNode(evt.target||evt.srcElement); 
     185                dojo.connect(targetWindow.document, "onmousedown", function(evt){ 
     186                    var n=evt.target||evt.srcElement; 
     187                    //Do not try to set focus to a node in an editor iframe if the window already has focus, see #6112 
     188                    if(targetWindow['__isEditorFrame'] && dijit._curFocus && dijit._curFocus.nodeName=='IFRAME' && 
     189                        dijit._curFocus.contentWindow===targetWindow ){ 
     190                        return; 
     191                    } 
     192                    dijit._justMouseDowned = true; 
     193                    setTimeout(function(){ dijit._justMouseDowned = false; }, 0); 
     194                    dijit._onTouchNode(n); 
    189195                }); 
    190196                //dojo.connect(targetWindow, "onscroll", ???); 
    191197 
  • _editor/RichText.js

     
    646646                this.isLoaded = true; 
    647647                if(!this.window.__registeredWindow){ 
    648648                        this.window.__registeredWindow=true; 
     649                        if(dojo.isIE){ 
     650                            this.window.__isEditorFrame=true; 
     651                        } 
    649652                        dijit.registerWin(this.window); 
    650653                } 
    651654                if(!dojo.isIE && (this.height || dojo.isMoz)){