Share via

SharePoint JSON List View Formatting and touch devices

Anonymous
2024-08-01T15:37:46+00:00

Hi all, I have an issue with a list customization through JSON column formatting when I use a touch-enabled device.

I created some simple button to do different activities:

  1. Open the list of related activities
  2. Open the list of related issues
  3. Launch a Power Automate flow that export all item's data on excel
  4. Launch a Power Automate flow that delete all item's data

Just for example the first field "Activities" contains the link to the Activity list and the JSON is below:

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "a",
  "attributes": {
    "iconName": "WorkItem",
    "class": "ms-fontColor-themePrimary",
    "href": "=@currentWeb + @currentField",
    "target": "_blank",
    "title": "Go to activities"
  },
  "style": {
    "font-size": "32px",
    "text-decoration": "none",
    "padding": "2px 0px 0px 15px",
    "display": "=if(@currentField!='', 'block','none !important')"
  }
}

On my desktop all works great, but if I try to use the same page on a device with Microsoft Edge i can't press on the buttons because the page open the item popup like if I make a double click on the row.

After some checks I found that the issue is due to this attribute:

If I change the value to false on a windows touch-enabled device through the developer console, the problem disappear and I'm able to click on the link and everything works, but without this change on the console and on different devices like an android smartphone the problem is the same.

The button works only on iOS devices (tried on iPhone and iPad).

There is a way to deactivate the "data-selection-touch-invoke" attribute? I tried with a list view JSON formatting but nothing seems to works. The workaround is to customize a gallery view, but I need to use the table format.

Let me know if someone faced this issue and found a way to solve it!

Thanks

Marco

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-08-08T21:26:15+00:00

    Hi Marco,

    Good day! I hope this message finds you well.

    I would like to express my sincere apologies for the inconvenience you have experienced. I am really sorry to hear about the difficulties you are facing with posting your question.

    To assist you further, you can try re-posting your question on our Q&A platform using a different account and you can also try to remove the JSON code which seems to be in plain text.

    Once again, I apologize for any inconvenience this may have caused. Please let me know if there is anything else I can do to assist you.

    Sincerely, Ralph Chawatama | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-08-02T11:18:47+00:00

    I tried two times to insert the question (the same text i posted in this page) in the Q&A portal but I always receive this generic message:

    I don't understand in what I'm wrong...

    Marco

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-08-01T15:59:49+00:00

    Dear Marco,

    Thank you for reaching out to the Microsoft Community. We’re always here to assist you.

    From your message, it appears that you’re looking for assistance with SharePoint JSON List View Formatting and touch devices. Our forum primarily focuses on addressing issues related to SharePoint’s built-in features.

    Unfortunately, we’re unable to provide the specific JSON code you need. For assistance with JSON code, we kindly suggest you visit the Microsoft Q&A Community. This platform specializes in customized design development in SharePoint. When asking a question, please use the ‘SharePoint Development’ tag. The dedicated team of engineers will focus on your specific scenario and provide you with the complete JSON code to meet your requirements.

    Image Image

    Please accept our sincere apologies for redirecting you to another platform. The moderators in this community have limited experience and resources to support JSON code. To ensure you receive prompt and appropriate assistance, we believe this is the best course of action.

    We appreciate your patience and understanding and thank you for your cooperation.

    Sincerely, Ralph Chawatama | Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments