Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CKEditor does not focus on iOS when tapping in text area

CKEditor 4.0.1 is failing to focus when tapping in the text area on iOS 6.1 Safari. This happens both on the iphone and ipad (both running iOS 6.1). I can eventually get it to focus by tapping it several times. Sometimes it takes 5 taps, sometimes it takes 10 or 15. If I click the bold button, it focuses right away. Any ideas? Is there a way for me to manually capture the tap event and then call something that will focus the editor? I'm using jquery.

like image 809
Redtopia Avatar asked Feb 17 '13 17:02

Redtopia


2 Answers

Adding height:100%; to HTML and BODY elements in editor-test.css will fix this issue. Final code will be like this:

html {height:100%;}
body {
    font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
    font-size: 12px; 
    line-height:1.4em;
    color: #333; 
    height:100%;
}
like image 188
trkaplan Avatar answered Oct 12 '22 06:10

trkaplan


I know this is an old question, but I ran up against this recently.

In the ckeditor folder I edited the contents.css file. (It styles the contents of the editor)

In the body section, I added:

body 
{
    /* [other code is left as found] */

    /* Add the line below  */
    min-height: calc( 100% - 40px );
}

This takes into account differing custom heights defined in config.js and the margin: 20px declaration (which seems to be default).

like image 44
aljachimiak Avatar answered Oct 12 '22 06:10

aljachimiak