无法编辑输入类型="文本"或与科尔多瓦1.9.0和Android果冻豆的textarea [英] Can't edit input type="text" or textarea with Cordova 1.9.0 and Android Jelly Bean

查看:108
本文介绍了无法编辑输入类型="文本"或与科尔多瓦1.9.0和Android果冻豆的textarea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚得到了我的闪闪发光的新的Nexus 7,并与科尔多瓦(PhoneGap的)玩耍。我创建了一个简单的页面,与一对夫妇文本输入字段和一个文本区域。在我的iPhone我可以单击文本框和键盘来了,我可以编辑文本。在我的Nexus 7运行4.1.1果冻豆与科尔多瓦1.9.0,键盘出现,但是当你键入没有显示在文本字段或文本区域。

I just got my shiny new Nexus 7 and was playing around with Cordova (Phonegap). I created a simple page with a couple of text input fields and a text area. On my iPhone I can click the text fields and the keyboard comes up and I can edit the text. On my Nexus 7 running 4.1.1 Jelly Bean with Cordova 1.9.0, the keyboard comes up but when you type nothing shows up in the text field or text area.

我是pretty的肯定,我的code是罚款,因为它适用于iPhone和Android 2.3.5,但这里是有问题的片段,以防万一:

I'm pretty sure my code is fine since it works on the iPhone and Android 2.3.5, but here is the snippet in question just in case:

  <body onload="onBodyLoad()">
  <div data-role="page" id="mainpage"> 
      <div data-role="header" data-theme="a"> 
          <h2>Lightweight</h2>
      </div>

      <div data-role="content">
        <div>
          <a href="#" data-role="button" data-icon="check" data-iconpos="bottom" data-theme="b" onClick=onClickInterrogate()>Interrogate</a>
        </div>

          <div align="center">
              <a href="#" data-role="button" data-inline="true" data-icon="forward" data-theme="b" onClick=downloadFile()>Send</a>
              <a href="#" data-role="button" data-inline="true" data-icon="gear" data-iconpos="right" data-theme="b" onClick=onClickSettings()>Settings</a>
          </div>

          <div align="center">
              <label for="serverUrl">Server URL:</label>
              <input type="text" name="name" id="serverUrl" value="urlGoesHere"/>
              <label for="zipFile">Zip File:</label>
              <input type="text" name="name" id="zipFile" value="tran1.zip"/>
          </div>
            <div data-role="fieldcontain">
                <label for="textarea">Textarea:</label>
                <textarea name="textarea" id="textarea">urlGoesHere</textarea>
            </div>
    </div>
      <div data-role="footer"> 
          <h1> &copy; 2012 Company Name </h1>
      </div>
  </div>   

我只是想这在Android 2.3.5,它工作正常。任何人都经历过类似的事情?

I just tried this on Android 2.3.5 and it works fine. Anyone experienced something similar?

推荐答案

在2.1.0的问题仍然存在,也是如此。

The issue persists in 2.1.0 as well.

下面就是我得到了它固定。

Here's how I got it fixed.

删除下面的CSS规则,你可以在输入元素愉快地打字。

Remove the following CSS rule and you can type happily in the input elements.

-webkit-user-select: none;

这篇关于无法编辑输入类型=&QUOT;文本&QUOT;或与科尔多瓦1.9.0和Android果冻豆的textarea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆