Mar 07 2024 01:48 AM - edited Mar 07 2024 12:50 PM
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
Mar 07 2024 03:38 AM
@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.
Mar 07 2024 04:30 AM - edited Mar 07 2024 04:32 AM
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"
}
}
]
}
Mar 07 2024 05:23 AM
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 iPhone: Get 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.
Mar 07 2024 11:20 AM - edited Mar 07 2024 05:03 PM
@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.
Mar 09 2024 12:34 PM - edited Mar 09 2024 12:37 PM
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.
Mar 09 2024 07:27 PM
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"
}
}
]
}
Mar 10 2024 12:31 AM - edited Mar 10 2024 12:56 AM
@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.
Mar 10 2024 01:49 AM
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.
Mar 10 2024 05:36 PM
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.
Mar 11 2024 10:10 AM