简体   繁体   中英

WebView selection causes soft keyboard to hide temporarily then come back

I have an application which contains a WebView. Inside it is a div with contenteditable=true.

Suppose I have some text already in the div. When I first click on the text, the cursor pops up and so does the soft keyboard. The problem is that if I click again, the soft keyboard disappears and then reappears.

Technically it isn't a problem since I can still write and do everything I need, but it is quite annoying to have the keyboard pop down and back up every time I want to click something.

I think the problem is coming from the WebView getting a focus event every time I click inside it, but I am unsure if this is the case.

Can someone enlighten me as to what is happening, or at least point me to some resources that can help me?

I tried it myself but there was the problem as you described. I think you must have done something to override the tap function, so that it retrace the keyboard and again find that the focus is on editable content so it give keyboard again, That's the best I could think of

Hope This Helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM