[BUGFIX] htmlArea RTE not loading with Safari 5.1
authorStanislas Rolland <typo3@sjbr.ca>
Sun, 24 Jul 2011 21:02:41 +0000 (17:02 -0400)
committerHelmut Hummel <typo3@helmut-hummel.de>
Sun, 24 Jul 2011 22:38:47 +0000 (00:38 +0200)
In Safari 5.1, due to changes related to WebKit2, the RTE may never
load while waiting for stylesheets to become accessible, or it may
load but the editing area remains empty and not editable.

Change-Id: I0eb45fbb6aad960ea65b052bf97a2ed90344c579
Fixes: #28360
Releases: 4.6, 4.5
Reviewed-on: http://review.typo3.org/3708
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 4d0bd44..c7a5753 100644 (file)
@@ -949,6 +949,7 @@ HTMLArea.Iframe = Ext.extend(Ext.BoxComponent, {
                if (!link0) {
                        link0 = this.document.createElement('link');
                        link0.rel = 'stylesheet';
+                       link0.type = 'text/css';
                                // Firefox 3.0.1 does not apply the base URL while Firefox 3.6.8 does so. Do not know in what version this was fixed.
                                // Therefore, for versions before 3.6.8, we prepend the url with the base, if the url is not absolute
                        link0.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^http(s?):\/{2}/.test(this.config.editedContentStyle)) ? this.config.baseURL : '') + this.config.editedContentStyle;
@@ -960,6 +961,7 @@ HTMLArea.Iframe = Ext.extend(Ext.BoxComponent, {
                        if (!link) {
                                link = this.document.createElement('link');
                                link.rel = 'stylesheet';
+                               link.type = 'text/css';
                                link.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^https?:\/{2}/.test(this.config.defaultPageStyle)) ? this.config.baseURL : '') + this.config.defaultPageStyle;
                                head.appendChild(link);
                        }
@@ -970,6 +972,7 @@ HTMLArea.Iframe = Ext.extend(Ext.BoxComponent, {
                        if (!link) {
                                link = this.document.createElement('link');
                                link.rel = 'stylesheet';
+                               link.type = 'text/css';
                                link.href = ((Ext.isGecko && navigator.productSub < 2010072200 && !/^https?:\/{2}/.test(this.config.pageStyle)) ? this.config.baseURL : '') + this.config.pageStyle;
                                head.appendChild(link);
                        }
@@ -2147,7 +2150,7 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                                                id: this.editorId + '-iframe',
                                                tag: 'iframe',
                                                cls: 'editorIframe',
-                                               src: (Ext.isGecko || Ext.isChrome) ? 'javascript:void(0);' : HTMLArea.editorUrl + 'popups/blank.html'
+                                               src: (Ext.isGecko || Ext.isWebKit) ? 'javascript:void(0);' : HTMLArea.editorUrl + 'popups/blank.html'
                                        },
                                        isNested: this.isNested,
                                        nestedParentElements: this.nestedParentElements,