taoguan / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

Fails on iPad #183

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When using jWYSIWYG on the iPad, I am unable to select the text box to input 
any text.

Original issue reported on code.google.com by umb...@gmail.com on 10 May 2010 at 4:18

GoogleCodeExporter commented 8 years ago
This is a patch I used to disable jwysiwyg on the iPad. Most likely not the 
best place to put it, but it's working 
for me.

{{{

Index: jquery.wysiwyg.js
===================================================================
--- jquery.wysiwyg.js   (revision 5167)
+++ jquery.wysiwyg.js   (working copy)
@@ -105,6 +105,11 @@

     $.fn.wysiwyg = function( options )
     {
+        if ( navigator.userAgent.match(/iPad/i) != null )
+        {
+            return this;
+        }
+      
         if ( arguments.length > 0 && arguments[0].constructor == String )
         {
             var action = arguments[0].toString();
}}}

Original comment by umb...@gmail.com on 10 May 2010 at 5:26

GoogleCodeExporter commented 8 years ago
Is WYSIWYG not allowed in Safari under iPad?
I'll test it only monday (no iPad at home).

I suppose that it MUST be handled not by editor but before calling of 
$().wysiwyg.

Original comment by akzhan.a...@gmail.com on 15 May 2010 at 4:12

GoogleCodeExporter commented 8 years ago
I believe this has to do with the restructuring of the DOM the plugin does.  It 
turns out the textarea becomes an iframe and the actual area the user is typing 
into is a P-tag.  iPad Safari doesn't seem to recognize this arrangement as a 
form input (as it isn't), so nothing happens.

Original comment by mr.estab...@gmail.com on 18 Aug 2011 at 8:25