Bug #5447

text input with inline pop-ups unreliable on iPad

Submitted:
2012-08-14 00:14:25 By: Laoma
Browsers:
safari
Open Priority: 3 Resolution: None Assigned to: None
Description of problem:

Steps to reproduce:
1. Open an inline pop-up edit window from an iPad (iOS 5.1.1)
2. Tap text where you want to input (this will work), type some text
3. Tap another text location to add input to
4. Now, any characters typed won't appear in the edit window
5.

Expected result: Tapping a second time will move the cursor position, and I can type more input starting at the new location.

Actual result: Cursor location changes, but no input is accepted.

 

If you wish to follow or post a comment, you need to be registered and logged in.

Comments

User Image
  • 2012-08-23 21:45:26

ShepQ

We have found that this is generally an issue on the iPad in both Chrome and Safari, even without inline popups being involved. It seems to happen almost any time you try to manually position the cursor.

The workaround was to hide the keyboard and then click in the editor again to get the keyboard back.

I suspect that the more general bug has already been filed, and I'm going to search for it.

User Image
  • 2012-08-23 22:14:37

Laoma

In case it helps, I worked around it by modifying defaultNativeHandler:

function defaultNativeHandler(evt) {
//alert (evt.type);
executeHandlers(fix(evt || win.event), id);
evt = fix(evt || win.event);
if (evt != null && window.tinyMCE.isIOS5) {
if (evt.type == "keyup") {
//alert(evt.type + "|" + lastevttype );
}
if (evt.type == "keydown" || evt.type == "keypress") {
lastevttype = evt.type;
lastevtkey = evt.which;
} else if (evt.type == "keyup" && lastevttype == "keydown"
&& !evt.ctrlKey && lastevtkey != 13 && lastevtkey != 8) {
//alert ("fake keypress" + lastevtkey);
lastevtype = "keypress";
window.tinyMCE.execCommand( "mceInsertContent", false, String.fromCharCode(lastevtkey) );
}
}
}

I'm pretty sure that the contentEditable support on the iPad is a bit buggy and prone to going away. So, admittedly, this is a hack, but it may add some insight into what is going on.