I have a part of code, where I create new elements on the fly and make them focusable.
The code is more complex, but here is a reproducible part on jsfiddle (when you click enter the next element is created and then focus is assigned to it):
$("body").on( "keypress", ".field", function(e) {
if ( e.keyCode == 13 ) {
$(this).after('<p class="field" contenteditable="true"><br></p>')
$(this).next().focus();
e.stopPropagation();
e.preventDefault();
}
});
This works as expected in desktop browsers, but it failed to focus the next element on ipad (and may be on iphone)