From 5f13575219a87055c548aff4168c99dc9a189797 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Wed, 28 Aug 2013 09:14:21 +0200
Subject: [PATCH] OO-531: workaround to fix the freeze of the form in IE8 (but
 don't break in other browsers) if a rich text editor is used

---
 .../flexible/impl/elements/richText/RichTextConfiguration.java | 3 ++-
 .../impl/elements/richText/RichTextElementRenderer.java        | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextConfiguration.java b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextConfiguration.java
index bcacb0263c9..fa31111635b 100644
--- a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextConfiguration.java
+++ b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextConfiguration.java
@@ -390,7 +390,8 @@ public class RichTextConfiguration implements Disposable {
 		plugins.add(SAFARI_PLUGIN);
 		// Start observing of diry richt text element and trigger calling of setFlexiFormDirty() method
 		// This check is initialized after the editor has fully loaded
-		addOnInitCallbackFunction(ONINIT_CALLBACK_VALUE_START_DIRTY_OBSERVER + ".curry('" + rootFormDispatchId + "','" + domID + "')");
+		addOnInitCallbackFunction(ONINIT_CALLBACK_VALUE_START_DIRTY_OBSERVER + "('" + rootFormDispatchId + "','" + domID + "')");
+		addOnInitCallbackFunction("tinyMCE.get('" + domID + "').focus()");
 	}
 
 	/**
diff --git a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementRenderer.java b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementRenderer.java
index df4cefa8bef..c70981afea5 100644
--- a/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementRenderer.java
+++ b/src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementRenderer.java
@@ -168,7 +168,6 @@ class RichTextElementRenderer implements ComponentRenderer {
 			// some special code to find out when the element is dirty. See the comments
 			// BTinyHelpers.js
 			sb.append("});");
-			sb.append("tinyMCE.get('").append(domID).append("').focus();");
 
 			
 			sb.append("} };");
-- 
GitLab