Using the contenteditable property, the cursor and the selection box in the iOS do not follow the scrolling problem?

web editor uses < div contenteditable= "true" > , but when its parent tags all have height: 100% style, in iOS"s webkit kernel browser, when the cursor does not select or select text, the cursor or check box does not follow the scrolling screen, and the cursor or check box does not follow the scroll. When the finger is raised, the cursor or check box jumps directly to the selected area.

The

code is as follows:

clipboard.png

:
1.

clipboard.png

2.:

clipboard.png

3.

clipboard.png

4. Normally, when scrolling, the check box should follow the text closely.

< hr >

my analysis:
I found that when the above three height: 100% styles, as long as you remove one of them, they all work. But height: 100% this cannot be easily removed, because the entire editing area should be adapted to the height of the browser.

< hr >

turn to the great gods, has anyone encountered this problem and how to solve it?

Menu