Ticket #3068: 3068_3.patch
File 3068_3.patch, 1.9 KB (added by , 15 years ago) |
---|
-
_source/core/dom/domobject.js
85 85 var listener = nativeListeners[ eventName ] = getNativeListener( this, eventName ); 86 86 87 87 if ( this.$.addEventListener ) 88 this.$.addEventListener( eventName, listener, false );88 this.$.addEventListener( eventName, listener, !!CKEDITOR.event.useCapture ); 89 89 else if ( this.$.attachEvent ) 90 90 this.$.attachEvent( 'on' + eventName, listener ); 91 91 } -
_source/plugins/floatpanel/plugin.js
130 130 // Non IE prefer the event into a window object. 131 131 var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); 132 132 133 focused.on( 'blur', function() 133 // With addEventListener compatible browsers, we must 134 // useCapture when registering the focus/blur events to 135 // guarantee they will be firing in all situations. (#3068) 136 CKEDITOR.event.useCapture = true; 137 138 focused.on( 'blur', function( ev ) 134 139 { 140 // As we are using capture to register the listener, 141 // the blur event may get fired even when focusing 142 // inside the window itself, so we must ensure the 143 // target is out of it. 144 var target = ev.data.getTarget(), 145 targetWindow = target.getWindow && target.getWindow(); 146 147 if ( targetWindow && targetWindow.equals( focused ) ) 148 return; 149 135 150 if ( !this._.activeChild ) 136 151 this.hide(); 137 152 }, … … 144 159 }, 145 160 this ); 146 161 162 CKEDITOR.event.useCapture = false; 163 147 164 this._.blurSet = 1; 148 165 } 149 166