onholdpulse and ontap, onrelease event enyojs in webOSTV

Hi all,
i add ontap, onholdpulse, onrelease event to a button, but i see ontap triger after i release onholdpulse event. Can you help me? i want to catch press and hold button event and release event. Thank you.
{
name:'forward',
classes:'ic-player ic-forward',
ontap:'buttonFastForwardTapped',
onholdpulse:'holdChanged',
onrelease:'releaseChanged',
spotlight:true,
defaultSpotlightUp:"forward",
defaultSpotlightLeft:"play",
defaultSpotlightRight:"skipforward",
onSpotlightDown:'controlSpotlightDownChanged'
},

Comments

  • For 2.5, you can prevent the tap by calling preventTap() on the up event.
    components: [
    {name: 'forward', onup: 'handleUp'}
    ],
    handleUp: function (sender, ev) {
    ev.preventTap();
    }
    In 2.7, in addition to the above, you can set preventTap on the hold config. You can use gesture.drag.configureHoldPulse to do so.
    var gesture = require('enyo/gesture');
    gesture.drag.configureHoldPulse({
    preventTap: true
    });
Sign In or Register to comment.