mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 14:18:46 +02:00
Don't fail TinyMCE cleanup if no current instance is set
Bug has been observed in IE8
This commit is contained in:
parent
eb9a8d6e6e
commit
8bedf485d6
@ -1360,7 +1360,7 @@ function sapphiremce_cleanup(type, value) {
|
|||||||
|
|
||||||
// if we are inserting from a popup back into the editor
|
// if we are inserting from a popup back into the editor
|
||||||
// add the changed class and update the Content value
|
// add the changed class and update the Content value
|
||||||
if(type == 'insert_to_editor') {
|
if(type == 'insert_to_editor' && typeof tinyMCE.selectedInstance.editorId !== 'undefined') {
|
||||||
var field = jQuery('#' + tinyMCE.selectedInstance.editorId);
|
var field = jQuery('#' + tinyMCE.selectedInstance.editorId);
|
||||||
var original = field.val();
|
var original = field.val();
|
||||||
if (original != value) {
|
if (original != value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user