Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

onclick sensitivity on screen

ANSWERED

Hello, was wondering if anyone has been playing with the .onclick event for onscreen items.  I can't figure out what I'm doing wrong, but basically I have a grid of icons and am trying to trap each icons tap using the onclick event in JS:

 

tl.onclick = function(e) {
  console.log("click tl");
  tl.href = setTheTile("TL");
}

 

I have also set the  pointer-events="visible" in the index.gui file for each svg element.  

 

What's odd is that this code works fine if the images are towards the bottom of the screen.  They seem hit or miss when in the middle and I cannot get anything to register towards the top.  I don't think it's the touchscreen since all other menus (slide right) seem to work fine with icons towards the top.

 

Any ideas of what I might be missing?


 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions
Best Answer
0 Votes
5 REPLIES 5

Could you put a sample project on Github? It could be device related, but it's best to be sure.

Best Answer
0 Votes

please simply try these instead

.onmouseup =

.onmousedown = 

Best Answer
0 Votes

It's probably a problem between the keyboard and the chair, but here is the code:

 

Tic Tac Doh!

Best Answer
0 Votes
Best Answer
0 Votes

Seriously...  Just seriously...  I am going to hang my head in shame...  

 

Thanks for the 2nd pair of eyes, didn't even think of looking at the CSS.

 

Smiley Mad

Best Answer
0 Votes