This is a migrated thread and some comments may be shown as answers.

IOS Textarea issues

3 Answers 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mat
Top achievements
Rank 1
Mat asked on 11 Dec 2012, 04:23 PM
In iOS when a textarea is focussed and then the view scrolled down the cursor floats over the text area until a new input is selected. Is there a way to keep the cursor in place when the view scrolls?

Also is there a workaround to allow a multi-line textarea?

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Dec 2012, 01:42 PM
Hi Mat,

This looks like a browser bug related to the flexbox styles used in the Kendo Mobile Application. As a workaround, you can blur the textarea when the user scrolls:

$(document.documentElement).on("touchmove", function(e){
    var activeEl = document.activeElement;
    if (activeEl.tagName.toLowerCase() == "textarea" && e.target != activeEl) {
        activeEl.blur();
    }
});

There is no limitation, which prevents you from using multiline textareas (I suppose you are referring to the textarea size, which is configurable via CSS or the rows HTML attribute, which is required anyway).

Regards,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Mat
Top achievements
Rank 1
answered on 12 Dec 2012, 02:54 PM
Dimo,

I'm afraid that workaround has had no effect in iOS
0
Dimo
Telerik team
answered on 13 Dec 2012, 03:07 PM
Hello Mat,

Well, it worked on my test page. Have you debugged the script to see whether the textarea is actually blurred?

I am afraid this is the only workaround I can offer you.

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Mat
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Mat
Top achievements
Rank 1
Share this question
or