aboutsummaryrefslogtreecommitdiff
path: root/sources/plugins/wysiwygarea
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2017-12-04 18:55:29 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2017-12-04 18:55:29 +0100
commit1794320dcfdfcd19572fb1676294f9853a6bbc20 (patch)
treea4c9e978947d6930d50391747382d7f95a5863e3 /sources/plugins/wysiwygarea
parent7183f6a6a21ad9124e70c997e0168459f377a9f2 (diff)
downloadludivine-ckeditor-component-master.tar.gz
ludivine-ckeditor-component-master.tar.zst
ludivine-ckeditor-component-master.zip
Update to 4.7.3HEAD4.7.3master
Diffstat (limited to 'sources/plugins/wysiwygarea')
-rw-r--r--sources/plugins/wysiwygarea/plugin.js54
1 files changed, 27 insertions, 27 deletions
diff --git a/sources/plugins/wysiwygarea/plugin.js b/sources/plugins/wysiwygarea/plugin.js
index 962f31e..1358129 100644
--- a/sources/plugins/wysiwygarea/plugin.js
+++ b/sources/plugins/wysiwygarea/plugin.js
@@ -29,7 +29,7 @@
29 // With IE, the custom domain has to be taken care at first, 29 // With IE, the custom domain has to be taken care at first,
30 // for other browers, the 'src' attribute should be left empty to 30 // for other browers, the 'src' attribute should be left empty to
31 // trigger iframe's 'load' event. 31 // trigger iframe's 'load' event.
32 // Microsoft Edge throws "Permission Denied" if treated like an IE (#13441). 32 // Microsoft Edge throws "Permission Denied" if treated like an IE (http://dev.ckeditor.com/ticket/13441).
33 if ( CKEDITOR.env.air ) { 33 if ( CKEDITOR.env.air ) {
34 src = 'javascript:void(0)'; // jshint ignore:line 34 src = 'javascript:void(0)'; // jshint ignore:line
35 } else if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) { 35 } else if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {
@@ -139,7 +139,7 @@
139 body.hideFocus = true; 139 body.hideFocus = true;
140 140
141 // Disable and re-enable the body to avoid IE from 141 // Disable and re-enable the body to avoid IE from
142 // taking the editing focus at startup. (#141 / #523) 142 // taking the editing focus at startup. (http://dev.ckeditor.com/ticket/141 / http://dev.ckeditor.com/ticket/523)
143 body.disabled = true; 143 body.disabled = true;
144 body.removeAttribute( 'disabled' ); 144 body.removeAttribute( 'disabled' );
145 } 145 }
@@ -156,19 +156,19 @@
156 156
157 var editable = this; 157 var editable = this;
158 158
159 // Without it IE8 has problem with removing selection in nested editable. (#13785) 159 // Without it IE8 has problem with removing selection in nested editable. (http://dev.ckeditor.com/ticket/13785)
160 if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) { 160 if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) {
161 doc.getDocumentElement().addClass( doc.$.compatMode ); 161 doc.getDocumentElement().addClass( doc.$.compatMode );
162 } 162 }
163 163
164 // Prevent IE/Edge from leaving a new paragraph/div after deleting all contents in body. (#6966, #13142) 164 // Prevent IE/Edge from leaving a new paragraph/div after deleting all contents in body. (http://dev.ckeditor.com/ticket/6966, http://dev.ckeditor.com/ticket/13142)
165 if ( CKEDITOR.env.ie && !CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_P ) { 165 if ( CKEDITOR.env.ie && !CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_P ) {
166 removeSuperfluousElement( 'p' ); 166 removeSuperfluousElement( 'p' );
167 } else if ( CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_DIV ) { 167 } else if ( CKEDITOR.env.edge && editor.enterMode != CKEDITOR.ENTER_DIV ) {
168 removeSuperfluousElement( 'div' ); 168 removeSuperfluousElement( 'div' );
169 } 169 }
170 170
171 // Fix problem with cursor not appearing in Webkit and IE11+ when clicking below the body (#10945, #10906). 171 // Fix problem with cursor not appearing in Webkit and IE11+ when clicking below the body (http://dev.ckeditor.com/ticket/10945, http://dev.ckeditor.com/ticket/10906).
172 // Fix for older IEs (8-10 and QM) is placed inside selection.js. 172 // Fix for older IEs (8-10 and QM) is placed inside selection.js.
173 if ( CKEDITOR.env.webkit || ( CKEDITOR.env.ie && CKEDITOR.env.version > 10 ) ) { 173 if ( CKEDITOR.env.webkit || ( CKEDITOR.env.ie && CKEDITOR.env.version > 10 ) ) {
174 doc.getDocumentElement().on( 'mousedown', function( evt ) { 174 doc.getDocumentElement().on( 'mousedown', function( evt ) {
@@ -196,7 +196,7 @@
196 // PageUp OR PageDown 196 // PageUp OR PageDown
197 if ( keyCode == 33 || keyCode == 34 ) { 197 if ( keyCode == 33 || keyCode == 34 ) {
198 // PageUp/PageDown scrolling is broken in document 198 // PageUp/PageDown scrolling is broken in document
199 // with standard doctype, manually fix it. (#4736) 199 // with standard doctype, manually fix it. (http://dev.ckeditor.com/ticket/4736)
200 if ( CKEDITOR.env.ie ) { 200 if ( CKEDITOR.env.ie ) {
201 setTimeout( function() { 201 setTimeout( function() {
202 editor.getSelection().scrollIntoView(); 202 editor.getSelection().scrollIntoView();
@@ -205,7 +205,7 @@
205 // Page up/down cause editor selection to leak 205 // Page up/down cause editor selection to leak
206 // outside of editable thus we try to intercept 206 // outside of editable thus we try to intercept
207 // the behavior, while it affects only happen 207 // the behavior, while it affects only happen
208 // when editor contents are not overflowed. (#7955) 208 // when editor contents are not overflowed. (http://dev.ckeditor.com/ticket/7955)
209 else if ( editor.window.$.innerHeight > this.$.offsetHeight ) { 209 else if ( editor.window.$.innerHeight > this.$.offsetHeight ) {
210 var range = editor.createRange(); 210 var range = editor.createRange();
211 range[ keyCode == 33 ? 'moveToElementEditStart' : 'moveToElementEditEnd' ]( this ); 211 range[ keyCode == 33 ? 'moveToElementEditStart' : 'moveToElementEditEnd' ]( this );
@@ -221,14 +221,14 @@
221 // focus is moved onto a non-editing host, e.g. link or button, but 221 // focus is moved onto a non-editing host, e.g. link or button, but
222 // it becomes a problem for the object type selection, since the resizer 222 // it becomes a problem for the object type selection, since the resizer
223 // handler attached on it will mark other part of the UI, especially 223 // handler attached on it will mark other part of the UI, especially
224 // for the dialog. (#8157) 224 // for the dialog. (http://dev.ckeditor.com/ticket/8157)
225 // [IE<8 & Opera] Even worse For old IEs, the cursor will not vanish even if 225 // [IE<8 & Opera] Even worse For old IEs, the cursor will not vanish even if
226 // the selection has been moved to another text input in some cases. (#4716) 226 // the selection has been moved to another text input in some cases. (http://dev.ckeditor.com/ticket/4716)
227 // 227 //
228 // Now the range restore is disabled, so we simply force IE to clean 228 // Now the range restore is disabled, so we simply force IE to clean
229 // up the selection before blur. 229 // up the selection before blur.
230 this.attachListener( doc, 'blur', function() { 230 this.attachListener( doc, 'blur', function() {
231 // Error proof when the editor is not visible. (#6375) 231 // Error proof when the editor is not visible. (http://dev.ckeditor.com/ticket/6375)
232 try { 232 try {
233 doc.$.selection.empty(); 233 doc.$.selection.empty();
234 } catch ( er ) {} 234 } catch ( er ) {}
@@ -237,14 +237,14 @@
237 237
238 if ( CKEDITOR.env.iOS ) { 238 if ( CKEDITOR.env.iOS ) {
239 // [iOS] If touch is bound to any parent of the iframe blur happens on any touch 239 // [iOS] If touch is bound to any parent of the iframe blur happens on any touch
240 // event and body becomes the focused element (#10714). 240 // event and body becomes the focused element (http://dev.ckeditor.com/ticket/10714).
241 this.attachListener( doc, 'touchend', function() { 241 this.attachListener( doc, 'touchend', function() {
242 win.focus(); 242 win.focus();
243 } ); 243 } );
244 } 244 }
245 245
246 var title = editor.document.getElementsByTag( 'title' ).getItem( 0 ); 246 var title = editor.document.getElementsByTag( 'title' ).getItem( 0 );
247 // document.title is malfunctioning on Chrome, so get value from the element (#12402). 247 // document.title is malfunctioning on Chrome, so get value from the element (http://dev.ckeditor.com/ticket/12402).
248 title.data( 'cke-title', title.getText() ); 248 title.data( 'cke-title', title.getText() );
249 249
250 // [IE] JAWS will not recognize the aria label we used on the iframe 250 // [IE] JAWS will not recognize the aria label we used on the iframe
@@ -292,7 +292,7 @@
292 // 2. On keyup remove all elements that were not marked 292 // 2. On keyup remove all elements that were not marked
293 // as non-superfluous (which means they must have had appeared in the meantime). 293 // as non-superfluous (which means they must have had appeared in the meantime).
294 // Also we should preserve all temporary elements inserted by editor – otherwise we'd likely 294 // Also we should preserve all temporary elements inserted by editor – otherwise we'd likely
295 // leak fake selection's content into editable due to removing hidden selection container (#14831). 295 // leak fake selection's content into editable due to removing hidden selection container (http://dev.ckeditor.com/ticket/14831).
296 editable.attachListener( editable, 'keyup', function() { 296 editable.attachListener( editable, 'keyup', function() {
297 var elements = doc.getElementsByTag( tagName ); 297 var elements = doc.getElementsByTag( tagName );
298 if ( lockRetain ) { 298 if ( lockRetain ) {
@@ -312,7 +312,7 @@
312 312
313 this._.frameLoadedHandler = CKEDITOR.tools.addFunction( function( win ) { 313 this._.frameLoadedHandler = CKEDITOR.tools.addFunction( function( win ) {
314 // Avoid opening design mode in a frame window thread, 314 // Avoid opening design mode in a frame window thread,
315 // which will cause host page scrolling.(#4397) 315 // which will cause host page scrolling.(http://dev.ckeditor.com/ticket/4397)
316 CKEDITOR.tools.setTimeout( onDomReady, 0, this, win ); 316 CKEDITOR.tools.setTimeout( onDomReady, 0, this, win );
317 }, this ); 317 }, this );
318 318
@@ -330,7 +330,7 @@
330 this.fixInitialSelection(); 330 this.fixInitialSelection();
331 331
332 // Fire dataReady for the consistency with inline editors 332 // Fire dataReady for the consistency with inline editors
333 // and because it makes sense. (#10370) 333 // and because it makes sense. (http://dev.ckeditor.com/ticket/10370)
334 editor.fire( 'dataReady' ); 334 editor.fire( 'dataReady' );
335 } 335 }
336 else { 336 else {
@@ -420,7 +420,7 @@
420 } 420 }
421 421
422 // The script that launches the bootstrap logic on 'domReady', so the document 422 // The script that launches the bootstrap logic on 'domReady', so the document
423 // is fully editable even before the editing iframe is fully loaded (#4455). 423 // is fully editable even before the editing iframe is fully loaded (http://dev.ckeditor.com/ticket/4455).
424 var bootstrapCode = 424 var bootstrapCode =
425 '<script id="cke_actscrpt" type="text/javascript"' + ( CKEDITOR.env.ie ? ' defer="defer" ' : '' ) + '>' + 425 '<script id="cke_actscrpt" type="text/javascript"' + ( CKEDITOR.env.ie ? ' defer="defer" ' : '' ) + '>' +
426 'var wasLoaded=0;' + // It must be always set to 0 as it remains as a window property. 426 'var wasLoaded=0;' + // It must be always set to 0 as it remains as a window property.
@@ -442,7 +442,7 @@
442 } 442 }
443 443
444 // IE<10 needs this hack to properly enable <base href="...">. 444 // IE<10 needs this hack to properly enable <base href="...">.
445 // See: http://stackoverflow.com/a/13373180/1485219 (#11910). 445 // See: http://stackoverflow.com/a/13373180/1485219 (http://dev.ckeditor.com/ticket/11910).
446 if ( baseTag && CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) { 446 if ( baseTag && CKEDITOR.env.ie && CKEDITOR.env.version < 10 ) {
447 bootstrapCode += 447 bootstrapCode +=
448 '<script id="cke_basetagscrpt">' + 448 '<script id="cke_basetagscrpt">' +
@@ -461,7 +461,7 @@
461 461
462 var doc = this.getDocument(); 462 var doc = this.getDocument();
463 463
464 // Work around Firefox bug - error prune when called from XUL (#320), 464 // Work around Firefox bug - error prune when called from XUL (http://dev.ckeditor.com/ticket/320),
465 // defer it thanks to the async nature of this method. 465 // defer it thanks to the async nature of this method.
466 try { 466 try {
467 doc.write( data ); 467 doc.write( data );
@@ -486,9 +486,9 @@
486 486
487 var data = fullPage ? doc.getDocumentElement().getOuterHtml() : doc.getBody().getHtml(); 487 var data = fullPage ? doc.getDocumentElement().getOuterHtml() : doc.getBody().getHtml();
488 488
489 // BR at the end of document is bogus node for Mozilla. (#5293). 489 // BR at the end of document is bogus node for Mozilla. (http://dev.ckeditor.com/ticket/5293).
490 // Prevent BRs from disappearing from the end of the content 490 // Prevent BRs from disappearing from the end of the content
491 // while enterMode is ENTER_BR (#10146). 491 // while enterMode is ENTER_BR (http://dev.ckeditor.com/ticket/10146).
492 if ( CKEDITOR.env.gecko && config.enterMode != CKEDITOR.ENTER_BR ) 492 if ( CKEDITOR.env.gecko && config.enterMode != CKEDITOR.ENTER_BR )
493 data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' ); 493 data = data.replace( /<br>(?=\s*(:?$|<\/body>))/, '' );
494 494
@@ -517,7 +517,7 @@
517 onResize; 517 onResize;
518 518
519 // Trying to access window's frameElement property on Edge throws an exception 519 // Trying to access window's frameElement property on Edge throws an exception
520 // when frame was already removed from DOM. (#13850, #13790) 520 // when frame was already removed from DOM. (http://dev.ckeditor.com/ticket/13850, http://dev.ckeditor.com/ticket/13790)
521 try { 521 try {
522 iframe = editor.window.getFrame(); 522 iframe = editor.window.getFrame();
523 } catch ( e ) {} 523 } catch ( e ) {}
@@ -530,7 +530,7 @@
530 CKEDITOR.tools.removeFunction( this._.frameLoadedHandler ); 530 CKEDITOR.tools.removeFunction( this._.frameLoadedHandler );
531 531
532 // On IE, iframe is returned even after remove() method is called on it. 532 // On IE, iframe is returned even after remove() method is called on it.
533 // Checking if parent is present fixes this issue. (#13850) 533 // Checking if parent is present fixes this issue. (http://dev.ckeditor.com/ticket/13850)
534 if ( iframe && iframe.getParent() ) { 534 if ( iframe && iframe.getParent() ) {
535 iframe.clearCustomData(); 535 iframe.clearCustomData();
536 onResize = iframe.removeCustomData( 'onResize' ); 536 onResize = iframe.removeCustomData( 'onResize' );
@@ -538,7 +538,7 @@
538 538
539 // IE BUG: When destroying editor DOM with the selection remains inside 539 // IE BUG: When destroying editor DOM with the selection remains inside
540 // editing area would break IE7/8's selection system, we have to put the editing 540 // editing area would break IE7/8's selection system, we have to put the editing
541 // iframe offline first. (#3812 and #5441) 541 // iframe offline first. (http://dev.ckeditor.com/ticket/3812 and http://dev.ckeditor.com/ticket/5441)
542 iframe.remove(); 542 iframe.remove();
543 } else { 543 } else {
544 CKEDITOR.warn( 'editor-destroy-iframe' ); 544 CKEDITOR.warn( 'editor-destroy-iframe' );
@@ -593,7 +593,7 @@
593 var css = []; 593 var css = [];
594 594
595 // IE>=8 stricts mode doesn't have 'contentEditable' in effect 595 // IE>=8 stricts mode doesn't have 'contentEditable' in effect
596 // on element unless it has layout. (#5562) 596 // on element unless it has layout. (http://dev.ckeditor.com/ticket/5562)
597 if ( CKEDITOR.document.$.documentMode >= 8 ) { 597 if ( CKEDITOR.document.$.documentMode >= 8 ) {
598 css.push( 'html.CSS1Compat [contenteditable=false]{min-height:0 !important}' ); 598 css.push( 'html.CSS1Compat [contenteditable=false]{min-height:0 !important}' );
599 599
@@ -604,14 +604,14 @@
604 604
605 css.push( selectors.join( ',' ) + '{display:inline-block}' ); 605 css.push( selectors.join( ',' ) + '{display:inline-block}' );
606 } 606 }
607 // Set the HTML style to 100% to have the text cursor in affect (#6341) 607 // Set the HTML style to 100% to have the text cursor in affect (http://dev.ckeditor.com/ticket/6341)
608 else if ( CKEDITOR.env.gecko ) { 608 else if ( CKEDITOR.env.gecko ) {
609 css.push( 'html{height:100% !important}' ); 609 css.push( 'html{height:100% !important}' );
610 css.push( 'img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}' ); 610 css.push( 'img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}' );
611 } 611 }
612 612
613 // #6341: The text cursor must be set on the editor area. 613 // http://dev.ckeditor.com/ticket/6341: The text cursor must be set on the editor area.
614 // #6632: Avoid having "text" shape of cursor in IE7 scrollbars. 614 // http://dev.ckeditor.com/ticket/6632: Avoid having "text" shape of cursor in IE7 scrollbars.
615 css.push( 'html{cursor:text;*cursor:auto}' ); 615 css.push( 'html{cursor:text;*cursor:auto}' );
616 616
617 // Use correct cursor for these elements 617 // Use correct cursor for these elements