jQWidgets Forums

jQuery UI Widgets Forums General Discussions jqxTouch & propagation

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxTouch & propagation #64609

    Florian Auer
    Participant

    Hi all

    I have some issue with the jqxTouch API and the ‘tap’ event for mobile devices as it seems.
    The code I have is a simple jqxExpander. The content area inside is made touchable due the jqxTouch Api.
    Inside the content area i have 2 buttons with the jqxButton API tied to them.

    the content touch area has an event bind to it with:
    $(.content).on('tap', function(){...});
    and each button the same way:
    $(.buttonOne).on('tap', function(){...});
    $(.buttonTwo).on('tap', function(){...});

    The problem is, that every hit to the button also bubbles up to the content, even if stopPropagation() and stopImmediatePropagation() is set inside all event handlers.
    If i set all events to ‘click’, the code reacts as expected with only one event called.

    Has this something to do with the type of the ‘tap’ detection used inside the jqxTouch, so that the browser sees two different events and can’t stop the propagation?
    I would expect that behaviour when the event types ahave been mixed, f.ex. the buttons set to ‘click’ and the touch set to ‘tap’ but not if all 3 event types are the same.

    jqxTouch & propagation #64610

    Peter Stoev
    Keymaster

    Hi DesMas,

    Events bubbling is something which is enabled by default for all JavaScript events. However, ‘tap’ and ‘click’ are same things and I don’t think you need to use jqxTouch for handling clicks at all.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.