Button events onmousedown/touchstart

  • Dinkel
    Moderator
      Has successfully completed the online course Introduction
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
      Has successfully completed the online course Basics (100)
    5 years, 8 months ago #18305

    Hi,

    I know there is a click event for buttons but I have a use-case where I want to use the events onmousedown/touchstart and onmouseup/touchend.
    Is there a way to achieve this?

    digitalysator
    Participant
      Has successfully completed the online course Introduction
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
    5 years, 8 months ago #18318
    Up
    1
    Down
    ::

    Another elegant option is to add this as customized widget. Especially if you need the widget with custom events more often I would suggest to use this opportunity.

    Go to Applications > Widgets and add a new widget.

    Select then OpenUI5:

    Select script to implement your extensions:

    Mathieu Roll
    Keymaster
      Has successfully completed the online course Introduction
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
      Has successfully completed the online course Basics (100)
    5 years, 8 months ago #18413
    Up
    1
    Down
    ::

    The best way to do this is like tg said.

    You can find an example of this in the Button Widget of the actual standard content.

    jonas.rausch
    Participant
      Has successfully completed the online course Introduction
      Has successfully completed the online course Intermediate (200)
      Has successfully completed the online course Advanced (300)
    5 years, 8 months ago #18308
    Up
    0
    Down
    ::

    Hi Dinkel,

     

    While OpenUi5 does not support these events, you can always attach a new event handler via jQuery

    $(‘#Buttonid’).on(“eventname (touchstart, click, e.t.c.)”, [function])

     

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

You must be logged in to reply to this topic.