【问题标题】:ionic2 contenteditable div not working in iOS devicesionic2 contenteditable div 在 iOS 设备中不起作用
【发布时间】:2016-11-16 00:34:21
【问题描述】:

我正在使用内容可编辑的 div 元素作为 ionic2 应用程序的输入字段。 它在浏览器和 android 设备上完美运行,但在 ios 设备上运行。

<div class="textarea" contenteditable="true" data-placeholder="Add emails"></div>

.ie-textarea {
    font-size:      fonts(ft-med) + .2;
    white-space:    normal;
    word-wrap:      break-word;
    min-height:     50px;
}

.ie-textarea:empty:before {
    content:    attr(data-placeholder);
    display:    block;
    color:      clr(grey-light);
}

【问题讨论】:

    标签: html angular ionic2


    【解决方案1】:

    在你的 CSS 中添加这个样式

    .textarea,
    [contenteditable] {
        -webkit-user-select: text;
        user-select: text;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-03
      • 2016-09-25
      • 1970-01-01
      • 2018-09-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多