Path

ez projects / ezoe / forum / general / cannot type on mobile platf...


Cannot type on mobile platforms (iPhone / iPad / Android)

You need to be logged in to post messages in the forums. New users may register here.

A Fowler

Member since:
13 April 2009

Posts: 4

Friday 16 July 2010 7:59:14 pm

When viewed on a mobile browser such as Safari on iPhone/iPad, or the browser in Android, the ezoe component does not appear to be recognized by these browsers/platforms as a text input area. Thus, the soft keyboard (on-screen touch keyboard) does not appear, and it is impossible to enter anything into the ezoe text input area.

Any solutions for this?

eZ Publish 4.2.0, ezoe 5.0.4, Ubuntu Server Linux (server), mobile browsers (client)
Up

André R

Member since:
20 August 2005

Posts: 171

Sunday 18 July 2010 12:08:20 pm

Make sure they don't get the online editor like trunk (5.2.0alpha) currently does for iphone/ipod:
http://websvn.projects.ez.no/wsvn/ezoe/trunk/?op=revision&rev=237

Should add Android also.

Edit: In trunk this code has been updated to match all mobile variants of WebKit:



           else if ( strpos( $userAgent, 'WebKit' ) !== false &&


                     strpos( $userAgent, ' Mobile' ) === false && // Mobile webkit does not have rich text editing support


                     strpos( $userAgent, ' Android' ) === false &&


                     strpos( $userAgent, ' iPad' ) === false &&


                     strpos( $userAgent, ' iPhone' ) === false &&


                     preg_match('/WebKit\/([0-9\.]+)/i', $userAgent, $browserInfo ) )


--
ar

Up

// Heath

Member since:
04 March 2007

Posts: 94

Monday 26 July 2010 6:32:59 pm

Hello everyone,

André, I have implemented the patch you suggest
yet even with the patch in place, caches cleared,
ezoe does not seem to properly deliver a
text input area to the user on an iPad.

Can you help in understanding why it is not working
and how it might be further improved?

Respectfully,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
GitHub | https://github.com/brookinsconsulting
eZpedia community documentation project | http://ezpedia.org
eZecosystem - eZ Publish Planet | http://ezecosystem.org
eZPublishLegacy - eZ Publish Release Mirror | http://ezpublishlegacy.com

Up

André R

Member since:
20 August 2005

Posts: 171

Tuesday 27 July 2010 10:03:14 am

Try to debug with this:



Index: trunk/ezoe/ezxmltext/handlers/input/ezoexmlinput.php


===================================================================


--- trunk/ezoe/ezxmltext/handlers/input/ezoexmlinput.php        (revision 262)


+++ trunk/ezoe/ezxmltext/handlers/input/ezoexmlinput.php        (working copy)


@@ -194,6 +194,7 @@


                if ( $browserInfo[1] >= 522.0 )


                    self::$browserType = 'WebKit';


            }


+           var_dump( self::$browserType );


            if ( self::$browserType === false )


                eZDebug::writeNotice( 'Browser not supported: ' . $userAgent, __METHOD__ );


        }




It should return false, meaning browser is not supported and eZ Publish should fallback to normal ezxmltext text area.
If it does not work as described above, please mention your ezoe + eZ Publish version.

--
ar

Up

// Heath

Member since:
04 March 2007

Posts: 94

Wednesday 28 July 2010 4:38:53 am

Hello,

I am using eZ Publish 4.2.0, ezoe 5.0.4, Ubuntu Server Linux (server), mobile browsers (client)

I found user agent strings which required different matching than what you were testing. Here is what worked much better for me.

elseif ( strpos( $userAgent, 'WebKit' ) !== false and


                    strpos( $userAgent, 'Mobile' ) === false and


                    strpos( $userAgent, 'Android' ) === false and


                    strpos( $userAgent, 'iPad' ) === false and // IPhone / IPad does not have rich text editing support


                    strpos( $userAgent, 'iPhone' ) === false and


                    strpos( $userAgent, 'iPod' ) === false and


                    preg_match('/WebKit\/([0-9\.]+)/i', $userAgent, $browserInfo ) )
This is because the iPhone/iPad user agent strings keep changing but the word iPhone/iPad exists just without the space (in your patch). http://stackoverflow.com/questions/2153877/what-is-the-ipad-user-agent

Example:

Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
GitHub | https://github.com/brookinsconsulting
eZpedia community documentation project | http://ezpedia.org
eZecosystem - eZ Publish Planet | http://ezecosystem.org
eZPublishLegacy - eZ Publish Release Mirror | http://ezpublishlegacy.com

Up

André R

Member since:
20 August 2005

Posts: 171

Wednesday 28 July 2010 2:55:31 pm

Thanks, haven't had this issue with Ipad here but changed trunk to not use whitespace.

--
ar

Up

// Heath

Member since:
04 March 2007

Posts: 94

Wednesday 28 July 2010 4:07:47 pm

Thank you very much André!

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
GitHub | https://github.com/brookinsconsulting
eZpedia community documentation project | http://ezpedia.org
eZecosystem - eZ Publish Planet | http://ezecosystem.org
eZPublishLegacy - eZ Publish Release Mirror | http://ezpublishlegacy.com

Up

You need to be logged in to post messages in the forums. New users may register here.