ssafronova (ssafronova) wrote in changelog,
ssafronova
ssafronova
changelog

[livejournal] r18388: LJSUP-7944: Rich text editor don't work ...

Committer: ssafronova
LJSUP-7944: Rich text editor don't work at iphone
[tags: pkornilov]
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-02-24 04:32:43 UTC (rev 18387)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-02-24 04:38:19 UTC (rev 18388)
@@ -638,7 +638,7 @@
                 $BML::ML{'entryform.subject'}
             </label>
             $subject_field
-            <ul id='entry-tabs' style='display: none;'>
+            <ul id='entry-tabs' style='visibility:hidden'>
                 $switch_rte_tab
                 $switch_plaintext_tab
             </ul>
@@ -1417,11 +1417,17 @@
 
         my $jnorich = LJ::ejs(LJ::deemp(BML::ml('entryform.htmlokay.norich2')));
         $out .= $self->wrap_js(qq{
-            if (FCKeditor_IsCompatibleBrowser()) {
-                if (!window.FCKLang) FCKLang = {};
-                Object.extend(window.FCKLang, $langmap);
-            } else {
-                document.getElementById('entry-tabs').style.visibility = 'hidden';
+            FCKeditor_IsCompatibleBrowser = (function(FCKeditor_IsCompatibleBrowser) {
+                return function() {
+                    if (~navigator.userAgent.indexOf('iPhone')) {
+                        return false;
+                    }
+                    return FCKeditor_IsCompatibleBrowser();
+                };
+            }(FCKeditor_IsCompatibleBrowser));
+            var FCKLang = FCKLang || {};
+            jQuery.extend(FCKLang, $langmap);
+            if (!FCKeditor_IsCompatibleBrowser()) {
                 document.getElementById('htmltools').style.display = 'block';
                 document.write("$jnorich");
                 usePlainText('draft');

Tags: livejournal, pkornilov, pm, ssafronova
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments