javascript - Cordova/Touch onclick events issues -


i use lot of onclick events on buttons in html pages normally, following pattern :

<button onclick="myfunction(this)"></button> 

some work, somedon't, , can't explain why.

these work :

<div>     <button class="static" onclick="myfunction('add');" style="">zzzzzzzzzzz</button>     <button class="static" onclick="myfunction('res');" style="">zzzzzzzzzzz</button>     <button class="static" onclick="myfunction('set');" style="">zzzzzzzzzzz</button> </div> 

these don't :

<center>     <button onclick="newedit(this)" class="pop_opt" style="height: 35px;">edit</button>     <hr/>     <button onclick="newconfirm(this);" class="pop_opt" style="height: 35px;">delete</button>     <hr/>     <button onclick="defaultpopup(this, '')" class="pop_opt" style="height: 35px;">cancel</button> </center> 

the differences see :

  1. the first buttons first clickable elements (they clickable elements on area).
  2. the others buttons clickable elements on clickable element (and if buttons clicked should deny parent click event).

note work in desktop browser, match issues when use in app (i tested cordova)

finally resolve changing html event onclick onmousedown & ontouchend


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -