Problem Description:

used the input box in the pop-up layer in H5 before ios 11.3, the cursor position is strange (incorrect), occasionally, in the subsequent ios update, this bug has been fixed, but in order to prevent the user's low system from causing problems, we still do Adaptation.

Reason:
It is because of the inaccurate ios positioning caused by the use of position: fixed in the pop-up layer, and there is a problem with ios parsing fixed.

solve 1:
Do not use position: fixed in the pop-up layer;

Solution 2:
It is inevitable to still use position: fixed is more common, so another solution:
When inputting onfocus, set:

document.body.style.position = 'fixed'; //ios11 适配光标位置问题

When inputting onBlur, set:

document.body.style.position = 'static'; //ios11 适配光标位置问题

Solution 3:
If you can, directly set the CSS style of the body

 position: fixed;
 width: 100%;

Above, according to the situation, you can try to repair it in your own way!


起风了
120 声望35 粉丝

北冥有鱼,其名为鲲。鲲之大,不知其几千里也;化而为鸟,其名为鹏。鹏之背,不知其几千里也;怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。