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

Combo activate events don't work

Combo widget is set up in widgets. 60x60 png image is in resources folder.

 

Here is UI portion

<use href="#combo-button-upper-right" fill="fb-red" id="btn-tr">
   <set href="combo-button-icon" attributeName="href" to="reverse.png"/>
   <set href="combo-button-icon-press" attributeName="href" to="reverse.png"/>
</use>

Here is JS portion:

let reverseBtn = document.getElementById('btn-tr');
reverseBtn.onactivate = function(e) {
  console.log('clicked');
  messaging.peerSocket.send(trainData);
}

Button shows fine, but upon pressing, the style is correct but JS is not picking up the event. No errors, just no feedback at all.

Best Answer
0 Votes
1 REPLY 1

Update:

 

My apologies, I thought combo buttons were to be used with the physical buttons. When I press the top right button, the clicked icon would appear but the event wouldn't trigger.  When I actually press the on screen button, the event works. Is there another method to utilize the hardware buttons?

Best Answer
0 Votes