HTML5 contenteditable attribute not working properly on iOS7 Mobile Safari

前端 未结 2 628
悲&欢浪女
悲&欢浪女 2021-02-02 13:08

It seems that the contenteditable attribute (which worked fine on iOS6) has stopped working on iOS7 webkit. Though the browser seems to recognize the field as editable, and brin

2条回答
  •  无人及你
    2021-02-02 13:22

    I ran into this problem today. The solution for me was to set user-select to "text" in the CSS for any editable elements:

    * {
        -webkit-user-select: none;
        user-select: none;
    }
    
    input,
    textarea,
    [contenteditable] {
        -webkit-user-select: text;
        user-select: text;
    }
    

提交回复
热议问题