Clicking the title link in the list webpart opens two tabs

Copper Contributor

Hello
Clicking a link (in a list column) in the list webpart opens in two new tabs.
Devices are iPad and iPhone. This happens in Chrome and Edge browsers. It's normal in Safari.
There is no problem when directly manipulating the list, but this problem occurs when it comes to list parts.
I am formatting the title column.
Does anyone know the cause?
thank you

10 Replies

@tom751000 Can you share the JSON you have used for formatting the list column?

 

Most probably the applied JSON formatting is causing this issue.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap 

I will share the JSON.
When I changed the default click to delete, a tab opened with a delete message. It works differently than before.

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "defaultClick"
},
"attributes": {
"title": "[$Title]",
"target": "_blank",
"data-interception": "off",
"rel":"noopener noreferrer"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [
{
"elmType": "div",
"txtContent": "[$Title]",
"style": {
"white-space": "nowrap",
"text-overflow": "ellipsis",
"overflow": "hidden",
"font-size": "20px"
}
}
]
}

@tom751000 

 

By looking at the JSON, it should not open the list forms in new tab. Also, "target": "_blank", is not really supported for button element to open the item in new tab. It should be used with the anchor (a) element.

 

I will suggest you to raise a support ticket with Microsoft directly and report this behavior while using iPad and iPhoneGet M365 Support - Online Support 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap

I found that even if I simply specified the button tag and defaultClick, two tabs were displayed when I clicked in the list parts field

defaultClick seems to behave strangely in Chrome and Edge on iPad and iPhone. Safari is fine. Also, only one will open in any browser on my PC.

I have opened a ticket with Microsoft support.

We will contact you with the results later.

@ganeshsanap 


I contacted support, but they seem to only be able to answer questions about standard features.
It seems to be out of scope.

It seems that support has confirmed this phenomenon.

I'm at a loss as to where to request improvement.

@tom751000 

Usually, the list itself is configured to Open items in a new tab, no adding this code is actually asking it to open it twice.

try removing the "target": "_blank" attribute from the attributes section in the JSON code. This should make the button open the item in the same tab instead of opening a new tab.

Below is the modified JSON without the "target": "_blank" attribute, hopefully this works or leads you to a path where you can resolve this

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
    "elmType": "button",
    "customRowAction": {
        "action": "defaultClick"
    },
    "attributes": {
        "title": "[$Title]",
        "data-interception": "off",
        "rel": "noopener noreferrer"
    },
    "style": {
        "border": "none",
        "background-color": "transparent",
        "cursor": "pointer"
    },
    "children": [
        {
            "elmType": "div",
            "txtContent": "[$Title]",
            "style": {
                "white-space": "nowrap",
                "text-overflow": "ellipsis",
                "overflow": "hidden",
                "font-size": "20px"
            }
        }
    ]
}

 

@Sandeep-Pothedar

thank you for your reply.

I certainly didn't need "target:_blank".

I checked it today.
This behavior no longer occurs for both incoming JSON and older JSON.

I don't know the cause, but it has been resolved. thank you everyone.

@tom751000 

 

Maybe some bug/glitch at Microsoft's end which got resolved with latest updates to SharePoint tenants.

 

I am glad it is working for you now as expected.


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap 

 

very sorry.
my misunderstanding.

I checked the operation in Safari. As expected, in Chrome and Edge for iPad and iPhone, two tabs open from the list web part.

Even if I implemented defaultClick on the new column, two tabs opened.

I found that this happens with the standard list web part without any JSON customization.

When using Chrome and Edge on iPad and iPhone,
Double tapping on a row behaves strangely.
Two tabs will open. JSON seems irrelevant.

I am currently asking MS Support again.