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

Fitbit OS Simulator not recognizing onclick events

ANSWERED

I've been using the simulator to test apps/clockfaces and, as of yesterday, it is no longer recognizing onclick events. This is code that previously worked on the simulator and still works when I install it directly on my watch. I tried restarting my computer and reinstalling the simulator. Are there any recommended troubleshooting steps for something like this? This is making testing my app very difficult.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

This is a long shot, but make sure that the simulator image isn't zoomed in or out. Apparently zooming can interfere with clicks in some circumstances.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
6 REPLIES 6

This is a long shot, but make sure that the simulator image isn't zoomed in or out. Apparently zooming can interfere with clicks in some circumstances.

Peter McLennan
Gondwana Software
Best Answer

This worked! Thanks, this is the third problem you've solved for me in a row. I didn't realize zoom could interfere with things.

Best Answer
0 Votes

😁

Zoom really shouldn't interfere, so you're right. I suspect there's a co-ordinate transformation missing within the bowels of the sim, with the result that click co-ordinates aren't being converted into something that makes sense. </guess>

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hello, having the same problem.

I started receiving complaints from my AcidClock clock face users that they can't click a button on a screen. The latest publish was a year ago and it worked back then. Now I can't test it on a device, but it does not work on a simulator (this also used to work before).

I can't run even the basic example from the documentation like this:

var mytest = document.getElementById("mytest");
mytest.style.fill = "blue";
mytest.onclick = function() {
    mytest.style.fill = "black";
}

mytest.addEventListener("click", function() {
    mytest.style.fill = "black";
});

<rect id="mytest" x="10" y="10" width="100" height="100" pointer-events="visible"/>


 

Clock face code: view js handler (see "btn-start-exercise").

What could be wrong? Are clicks on a watch face prohibited since some recent update?

 

Regarding an advice from this topic: I can't find a zoom button of the clock face on Windows simulator (only "Settings" zoom is present there).

Best Answer
0 Votes

@anton.acidclock- Zoom is ctrl shift + or ctrl - or ctrl 0 for no zoom.

 

Check you didn't accidentally add another field overlapping or with the same name.

 

You can do this by giving your rectangle a color and opacity = 0.5 and do this for any other nearby fields.

Author | ch, passion for improvement.

Best Answer

I've found a workaround that works for me. The bug was reproducible on Windows regardless of Fitbit simulator updates, reinstalls, trying different code etc.

But the same code works for me on Fitbit simulator running on Mac.

Best Answer
0 Votes