JSON custom for double click when open the file

Harris 160 Reputation points
2025-12-02T12:55:12.34+00:00

How to use JSON to force users have to double click when they want to open the file in SharePoint Site instead of single click by default

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jayden-P 12,230 Reputation points Microsoft External Staff Moderator
    2025-12-02T13:55:07.67+00:00

    Hi @Harris

    Thank you for posting your question in the Microsoft Q&A forum.

    Based on my testing, you just need to render the file name as plain text (by default, it is displayed as a link that you can single click and open the file).

    With this way, when the user single click, it will just select the file instead of opening it.

    If you double click, the file will open.

    Please put this JSON code into your file name column:

    {
      "$schema": "
      "elmType": "span",
      "txtContent": "[$FileLeafRef]",
      "style": {
        "fontWeight": "600",
        "color": "#333"
      }
    }
    

    I hope this helps.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.