plugins/wysiwygarea/plugin.js | 48 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/plugins/wysiwygarea/plugin.js b/plugins/wysiwygarea/plugin.js
index f180125..3166b6c 100644
|
a
|
b
|
|
| 179 | 179 | } |
| 180 | 180 | }, 0 ); |
| 181 | 181 | } |
| 182 | | } ); |
| | 182 | }); |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | // Fix problem with cursor not appearing in Webkit and IE11+ when clicking below the body (#10945, #10906). |
| … |
… |
|
| 217 | 217 | } ); |
| 218 | 218 | } |
| 219 | 219 | } |
| | 220 | else if ( CKEDITOR.env.ie ) |
| | 221 | { |
| | 222 | // Hook the onresizestart and onresizeend events so that we can track resizing via the native browser size grips (#1511). |
| | 223 | function resizeStart( evt ) { |
| | 224 | oldSelectedElement.$.detachEvent( 'onresizestart', resizeStart ); |
| | 225 | // Save an initial snapshot so that we can detect the first resize. |
| | 226 | editor.fire( 'saveSnapshot' ); |
| | 227 | }; |
| | 228 | |
| | 229 | function resizeEnd( evt ) { |
| | 230 | editor.fire( 'saveSnapshot' ); |
| | 231 | }; |
| | 232 | |
| | 233 | var oldSelectedElement = null; |
| | 234 | |
| | 235 | function monitorResizeForCurrentSelection() |
| | 236 | { |
| | 237 | var selection = doc.getSelection(); |
| | 238 | if ( !selection ) |
| | 239 | { |
| | 240 | return; |
| | 241 | } |
| | 242 | |
| | 243 | var selectedElement = selection.getSelectedElement(); |
| | 244 | if ( !selectedElement ) |
| | 245 | { |
| | 246 | return; |
| | 247 | } |
| | 248 | |
| | 249 | selectedElement.$.attachEvent( 'onresizestart', resizeStart ); |
| | 250 | selectedElement.$.attachEvent( 'onresizeend', resizeEnd ); |
| | 251 | oldSelectedElement = selectedElement; |
| | 252 | } |
| | 253 | |
| | 254 | this.attachListener( doc, 'selectionchange', function ( evt ) { |
| | 255 | if (oldSelectedElement) |
| | 256 | { |
| | 257 | oldSelectedElement.$.detachEvent('onresizeend', resizeEnd); |
| | 258 | oldSelectedElement = null; |
| | 259 | } |
| | 260 | |
| | 261 | monitorResizeForCurrentSelection(); |
| | 262 | }); |
| | 263 | |
| | 264 | monitorResizeForCurrentSelection(); |
| | 265 | } |
| 220 | 266 | |
| 221 | 267 | if ( CKEDITOR.env.gecko || CKEDITOR.env.ie && editor.document.$.compatMode == 'CSS1Compat' ) { |
| 222 | 268 | this.attachListener( this, 'keydown', function( evt ) { |