Detect iOS 8 Quicktype suggestion paste - ios

For rich text editing I have a UIWebView where I load a local html content with some contenteditable div.
When user is pressing some keys on keyboard I want to detect content changes within that div, resize it accordingly and scroll properly to position cursor above the keyboard.
I'm able to do this using onkeyup event handler:
<div id="contents" onkeyup="keyup()" onpaste="paste()" contenteditable="true">...</div>
In iOS 8 keyboard now has the Quicktype panel with some suggestion words to quickly paste into editable area. How to detect the action of pasting the suggestion text into div?
Event handler like onkeyup doesn't help as the text is pasted without pressing keyboard buttons, onpaste event is not get called.
I also tried to implement MutationObserver to detect DOM changes when something is pasted - doesn't help too.
I'm struggling trying to find the working solution. Any advice is appreciated. Thanks!

In Mobile Safari the iOS 8 Quicktype words fire two (maybe identical?) input events.
Try this in the developer console:
$('input[type=text]').on("input", console.log.bind(console, "input!"));
In UIWebView I have not tried...

Related

Textarea not showing up anything on iOS Safari Mobile

I have a textarea element in a form. When I click on a button the form will show up(with dynamic html) and I am able to see the textarea element with all the styles.
But, when I click on the textarea to type, except the cursor every style of that textarea is disappearing. I am not able to inspect this because it is only happening on iOS Safari browser.
Can anyone please let me know how to solve this?
Form show up in modal?
Maybe you have same problem with this case.
iOS 11 Safari bootstrap modal text area outside of cursor

Disappearing Cursor pointer in input text field of ionic ios app

I am working on ionic application.I have a problem with keyboard in iphone 4s with iOS 9, when I click on any text field the keyboard pops up but, I can't see cursor and what I am typing in the input textbox, it shows nothing when I type, but when I change my focus to another field, the text automatically appears. Anyone has got the same issue? What did you do to rectify it?
First take backup of your project then,
You need to remove all your controllers, texts, buttons,styles from that view, and then add them brick by brick
everytime make build of it and check it, by this way you will get your solution.
for me it was css of h3 tag.
that was hiding text in input.

iPad text input and text selecting not working properly

This will be difficult to explain so I won't paste any code.
I'm implementing a wysiwyg editor on my site called wysihtml5 and there are several issues when selecting the textarea/editor with the iPad. On a desktop browser, all is fine, the text can be selected, edited, pasted etc. But on the iPad multpiple issues occur:
Can't tap anywhere in the text to move the cursor there
If I manually move the cursor, all of a sudden I can't type anything anymore
Tapping outside of the texteditor doesn't bring the keyboard down
Basically I'm just hoping there's someone who has had similiar experiences with iPad cursor not behaving correctly in text input fields and what possible solutions there might be. I'm stuck and have no idea how to debug this.
Did you use touch event? iOS has a bug: you can't input in editable iframe if you are listening(or had listened) any touch event(touchstart, touchmove...), I tested this bug occurs even you listen other elements but iframe itself. yes, it's a serious bug, you can check out:
wysihtml5 issues98

Corona sdk text input

I have looked at example code that uses the native textField on Android. I would like to be able to type into the text field without having to touch a button to show the text field, and then touch inside the text field to start typing. Is there a way to show the text field and set focus to it, where I can start typing without touching other buttons. I am working on an app and I don't want the users to have to take extra steps to begin typing text. Thanks for any advice.
You can call native.setKeyboardFocus(yourField) to show the keyboard.
http://docs.coronalabs.com/api/library/native/setKeyboardFocus.html

Disable iOS keyboard (don't show it at all) in phonegap

If I were writing a native app I would try the solution given here which says:
"Try to implement the following method in text view's delegate:"
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{
return NO;
}
Unfortunately I need to use phonegap, so I don't have a text view to manipulate. It would be great if I could permanently suppress the keyboard in this app. We've got some custom on screen keyboard that people are supposed to use instead. So, any idea how to disable the popup keyboard completely?
Just put a transparent div over the input field, so the the click will be on that div and not on the input field. Now you can activate your own keyboard by click and fill in the characters with javascript.
Update:
The following solution works:
The keyboard is directly linked to the focus on the input field. when you use readonly="true", you can get the click event and then you should be able to chamge the value. in jQuery something like this: $('myinputfield').click(function(){$(this).val(newinput);});

Resources