Ticket #4682: 4682_3.patch
File 4682_3.patch, 1.3 KB (added by , 14 years ago) |
---|
-
_source/plugins/selection/plugin.js
120 120 // "onfocusin" is fired before "onfocus". It makes it 121 121 // possible to restore the selection before click 122 122 // events get executed. 123 body.on( 'focusin', function( )123 body.on( 'focusin', function( evt ) 124 124 { 125 // If there are elements with layout they fire this event but 126 // it must be ignored to allow edit its contents #4682 127 if ( evt.data.$.srcElement.nodeName != 'BODY' ) 128 return; 129 125 130 // If we have saved a range, restore it at this 126 131 // point. 127 132 if ( savedRange ) … … 146 151 saveSelection(); 147 152 }); 148 153 149 body.on( 'beforedeactivate', function( )154 body.on( 'beforedeactivate', function( evt ) 150 155 { 156 // Ignore this event if it's caused by focus switch between 157 // internal editable control type elements, e.g. layouted paragraph. (#4682) 158 if ( evt.data.$.toElement ) 159 return; 160 151 161 // Disable selections from being saved. 152 162 saveEnabled = false; 153 163 });