ios web输入框已有内容,再次点击输入框内容后空白,光标回到了最前面

输入框为absolute定位
html

<form action="#" class="cell_1">
                <input class="fundSearch" type="search" placeholder="请输入支行名字和关键字"/>
                <span class="delete"><img src="../../src/images/search/delete@3x.png" alt=""></span>
</form>

scss

    form{
        position: relative;
        .fundSearch{
            -webkit-appearance: none;
            outline: none;
            line-height: normal;
            @include px2rem(padding, 19 70 13 64);
            @include px2rem(font-size, 28);
            width: -webkit-fill-available;
            @include px2rem(border-radius,8);
            border: 1px solid rgba(229,229,229,0.8);
            background: url("../images/search/search@3x.png") no-repeat;
            @include px2rem(background-position, 20 18);
            @include px2rem(background-size, 31 30);
            background-color: rgba(244,244,244,0.8);
        }
        .delete{
            position: absolute;
            @include wh(64,64);
            @include px2rem(padding, 22 0 0 17);
            top:0;
            right:0;
            
            img{
                @include wh(28,28); 
            }     
    }     
    }

图片描述

IOS输入一段内容后,点击一下输入框内容后的空白区域,光标突然就跳到内容的最前面了,这个应该怎么解决?

阅读 3k
2 个回答

请问解决没有,我也遇到这个问题了

推荐问题