HTML5 contenteditable attribute not working properly on iOS7 Mobile Safari

前端 未结 2 626
悲&欢浪女
悲&欢浪女 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:38

    I was having the same issue and the below link helped me resolve it.

    https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-SW1

    The solution that worked for me was to set "-webkit-user-modify" property to "read-write" for any editable element (you have defined as contenteditable)

    *{
        -webkit-user-modify:read-write;
    }
    

提交回复
热议问题