【问题标题】:Disable first letter capitalization in android webview (html textarea)在android webview(html textarea)中禁用首字母大写
【发布时间】:2019-01-05 07:08:09
【问题描述】:

嗨!我正在为 android 开发一个 webview 应用程序,但我遇到了一个非常大的问题。从上图中可以看出,单行文本字段和文本区域的键盘是不同的。这个应用程序不要自动将文本区域的第一个字母大写,这一点非常重要,但如果需要,我必须让用户可以使用大写字母。

html代码很简单:

<input type="text" />
<textarea></textarea>

iOS 通过 textarea 的这些 html 属性解决了这个问题:

autocorrect="off" autocapitalize="off"

此解决方案不适用于 android webview。我到处寻找,但没有找到任何解决方案。是否可以通过 html/javascript/android 为 textarea 使用小键盘?

非常感谢!!

【问题讨论】:

    标签: android android-webview android-softkeyboard


    【解决方案1】:

    试试这个

    <input autocapitalize="off" autocorrect="off" />
    

    【讨论】:

      【解决方案2】:

      你可以试试这个。

         <input type="text" name="txt1" style="text-transform: lowercase;">
         <textarea   name="txt1" style="text-transform: lowercase;"></textarea>
      

      【讨论】:

        【解决方案3】:

        autocapitalize="off" 自 2015 年起可在 Android 上使用。我找不到任何关于自动更正的信息。见https://developers.google.com/web/updates/2015/04/autocapitalize

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2021-07-29
          • 2011-05-14
          • 1970-01-01
          • 2011-11-13
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多