phonegap触摸事件/ div溢出 [英] phonegap touch event / div overflow

查看:317
本文介绍了phonegap触摸事件/ div溢出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题:



我有一个表的css div(jquery-mobile 1.0), - 如果我在div触摸事件没有触发javascript功能...任何想法?



它,不是启动函数和溢出,它的工作正常!)

  $('#mytable')。append('< tr>< td width = 20%> 
< ; a href = add.html onclick = setId('+ row.UserId +');>
< img src =。/ icons / patientendaten.png width = 48px height = 48px>< / a>< ; / td>
< td width = 20%>'+ row.Datum +'< / td>< td width = 20%>'+ row.Patient +'< / td>
< td width = 20%>< center>< a href =#onclick = delete_entry('+ row.UserId +'); 
< img src =。/ icons / delete。 pgs>< / a>< / center>< / td>< td width = 20%>< center>
< img src =。/ icons / edit.png>< center>
< / td>< / tr>');

 < div data-role =content> 

< div id =twitter>

< div class =ui-grid-d>
< div class =ui-block-a>< div class =ui-bar ui-bar-d> Akte< / div>< / div>
< div class =ui-block-b>< div class =ui-bar ui-bar-d> Datum< / div>< / div>
< div class =ui-block-c>< div class =ui-bar ui-bar-d>病人/ in< / div>< / div>
< div class =ui-block-d>< div class =ui-bar ui-bar-d>Löschen< / div>< / div>
< div class =ui-block-e>< div class =ui-bar ui-bar-d> Fallbeisp。 erstellen< / div>< / div>
< br>

< table id = mytable>

< / table>

< / div>
< / div>
< / div>

我使用jquery mobile 1.0和最新的phonegap 1.7在android 3.2上



此外,logcat给了我(当我添加第6行时)


:59:18.030:E / libEGL(16161):调用没有当前上下文的OpenGL ES API(每个线程记录一次)



05-24 23:59:18.030 :D / ShaderProgram(16161):无法加载顶点着色器!



$ b



Logcat:

  05-23 17:05:51.800:V / webview(30492):singleCursorHandlerTouchEvent -getEditableSupport FASLE 


解决方案

我想出了蓝色div问题... jquery-mobile / phonegap有一个溢出的问题,导致错误!

  05-24 23: 59:18.030:E / libEGL(16161):调用没有当前上下文的OpenGL ES API(每个线程记录一次)

05-24 23:59:18.030:D / ShaderProgram无法加载顶点着色器!

#twitter {
position:absolute;
top:140px;
left:40px;
width:880px;
height:400px;
border:5px solid;
border-color:#458d91;
-moz-border-radius:16px;
-khtml-border-radius:16px;
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:10px;
padding-top:10px;
padding-left:10px;
padding-right:10px;
padding-bottom:10px;
overflow:auto;
}



如果我删除溢出和高度,那么没有任何问题。



在这种情况下使用列表可能是一个更好的方式。



我也尝试了不同的jquery- ,jquery - 结合不同的phonegap版本 - 这是在三星Galaxy 10.1平板电脑测试 - Android 3.2



希望这有助于。


My problem:

I have a css div with a table (jquery-mobile 1.0), - If I add too much rows in the div (overflow) the touch event isnt't fireing the javascript functions...any idea?

it,s not fireing the functions and " overflow, before it's working fine !)

$('#mytable').append('<tr><td width=20%>
    <a href=add.html onclick=setId('+row.UserId+');>
    <img src=./icons/patientendaten.png width=48px height=48px></a></td>
    <td width=20%>'+row.Datum+'</td><td width=20%>'+row.Patient+'</td>
    <td width=20%><center><a href=# onclick=delete_entry('+row.UserId+');>
         <img src=./icons/delete.png></a></center></td><td width=20%><center>
         <img src=./icons/edit.png></center>
    </td></tr>'); 

More Details:

<div data-role="content">  

    <div id="twitter">

       <div class="ui-grid-d">
        <div class="ui-block-a"><div class="ui-bar ui-bar-d">Akte</div></div>
        <div class="ui-block-b"><div class="ui-bar ui-bar-d">Datum</div></div>
        <div class="ui-block-c"><div class="ui-bar ui-bar-d">Patient/in</div></div>
        <div class="ui-block-d"><div class="ui-bar ui-bar-d">Löschen</div></div>
        <div class="ui-block-e"><div class="ui-bar ui-bar-d">Fallbeisp. erstellen</div></div>
        <br>

    <table id=mytable>

    </table>

  </div>
     </div>
         </div>

I am using jquery mobile 1.0 and the newest phonegap 1.7 on android 3.2

In addition the logcat gives me (when I am adding row nr. 6)

05-24 23:59:18.030: E/libEGL(16161): call to OpenGL ES API with no current context (logged once per thread)

05-24 23:59:18.030: D/ShaderProgram(16161): couldn't load the vertex shader!

Here is my div:

Logcat:

05-23 17:05:51.800: V/webview(30492):  singleCursorHandlerTouchEvent -getEditableSupport  FASLE 

解决方案

I came up with the solution that the blue div is the problem...jquery-mobile/phonegap have a problem with that overflow which leads to the error !

05-24 23:59:18.030: E/libEGL(16161): call to OpenGL ES API with no current context (logged once per thread)

05-24 23:59:18.030: D/ShaderProgram(16161): couldn't load the vertex shader!

#twitter {
    position:absolute;
    top:140px;
    left:40px;
    width: 880px;
    height: 400px;
    border: 5px solid;
    border-color: #458d91;
    -moz-border-radius:16px;
    -khtml-border-radius:16px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    padding-top: 10px;
    padding-left:10px;
    padding-right:10px;
    padding-bottom: 10px;
    overflow: auto;
  }

If I am deleting the overflow and height, then there isn't any problem.

Using lists in that case is maybe a better way to go.

I also tried different jquery-mobile, jquery - in combination with different phonegap versions - this was tested on the samsung galaxy 10.1 tablet - android 3.2

Hope this helps.

这篇关于phonegap触摸事件/ div溢出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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