[Rt-commit] rt branch, 4.0/chrome-forward-fix, created. rt-4.0.1rc1-18-gabc1146
? sunnavy
sunnavy at bestpractical.com
Mon Jun 20 08:56:41 EDT 2011
The branch, 4.0/chrome-forward-fix has been created
at abc114667008edeaec96e5126d41520d12910c64 (commit)
- Log -----------------------------------------------------------------
commit abc114667008edeaec96e5126d41520d12910c64
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Jun 20 20:55:10 2011 +0800
fix a chrome back/forward bug
diff --git a/share/html/NoAuth/js/util.js b/share/html/NoAuth/js/util.js
index b1a4a0b..515d760 100644
--- a/share/html/NoAuth/js/util.js
+++ b/share/html/NoAuth/js/util.js
@@ -277,7 +277,16 @@ function ReplaceAllTextareas(encoded) {
if (jQuery(textArea).hasClass("messagebox")) {
// Turn the original plain text content into HTML
if (encoded == 0) {
- textArea.value = textToHTML(textArea.value);
+ // Chrome has a weird back/forward problem:
+ // it does the convertion on the already converted value
+ // the nonstandard .html() helps avoiding this
+ // see also #17707
+ if ( sAgent.match(/chrome/i) ) {
+ jQuery(textArea).html(textToHTML(textArea.value));
+ }
+ else {
+ textArea.value = textToHTML(textArea.value);
+ }
}
// For this javascript
var CKeditorEncoded = document.createElement('input');
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list