cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAC onLongPress() event not working on desktop?

attila_kiss
Explorer
0 Likes
677

Dear Colleagues,

I'm asking for help:

Using Optimized View Story, and for the onLongPress() event of any widget (button, picture) no script runs. Seems like that feature is just not working. Could you please provide some guidance if any additional configuration is needed (e.g. configure duration) to make it work?

many thanks,

Attila

Accepted Solutions (1)

Accepted Solutions (1)

JBARLOW
Active Contributor

Hi there,

Alas the long press event only works in mobile not on desktop 😞

Answers (1)

Answers (1)

SANJEEVE
Participant
0 Likes

 Here are some steps and considerations to help you troubleshoot and potentially resolve the issue:

  1. Check for Known Issues:
    • Ensure that there are no known bugs or issues with the onLongPress() event in the version of SAC you are using. Sometimes, specific versions may have bugs that are resolved in later updates.
  2. Configuration of Duration:
    • The onLongPress() event typically triggers after a certain duration of pressing. If you need to configure this duration, you might need to adjust the settings in your script or use a custom implementation. For example, in some frameworks, you can set the duration like this:

SANJEEVE_0-1741256106515.png

 

This example shows how to set a custom duration for the onLongPress() event.

  1. Ensure Proper Event Binding:
    • Verify that the onLongPress() event is correctly bound to the widget. Double-check your code to ensure that the event handler is properly assigned and that there are no syntax errors.
  2. Test in Different Environments:
    • Sometimes, issues may be specific to certain environments or devices. Test the onLongPress() event in different browsers or devices to see if the issue persists.
  3. Consult Documentation and Community:
    • Refer to the official SAP documentation for any specific instructions or configurations related to the onLongPress() event in Optimized View Story. Additionally, you can seek help from the SAP community forums where other users might have faced and resolved similar issues.

If these steps do not resolve the issue, consider reaching out to SAP support for further assistance. They might be able to provide more specific guidance based on your setup and the version of SAC you are using.

Feel free to ask if you have any more questions or need further clarification!

 

JBARLOW
Active Contributor
As per my answer below, long press only works in mobile enabled SAC stories.