Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List Formatting: Custom card with openOnEvent set to hover does not open #10036

Open
2 of 9 tasks
tecchan1107 opened this issue Dec 1, 2024 · 4 comments
Open
2 of 9 tasks
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@tecchan1107
Copy link
Contributor

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

No response

Describe the bug / error

When openOnEvent is set to hover, the custom card sometimes does not open. It seems that the custom card only displays when the area around the customCardProps element is clicked, and the focus is on that element.

sample

On the other hand, when openOnEvent is set to click, the custom card opens without any issues.

sample2

Steps to reproduce

Create some items in the list and apply the following JSON to the view formatting

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "hideColumnHeader": true,
  "hideSelection": true,
  "rowFormatter": {
    "elmType": "div",
    "txtContent": "Hover to open the card",
    "style": {
      "width": "300px",
      "height": "50px",
      "border-bottom": "1px solid",
      "text-decoration": "none",
      "display": "flex",
      "flex-direction": "row",
      "font-size": "18px",
      "cursor": "default"
    },
    "attributes": {
      "class": "ms-bgColor-themeLighter--hover"
    },
    "customCardProps": {
      "openOnEvent": "hover",
      "directionalHint": "rightCenter",
      "isBeakVisible": true,
      "formatter": {
        "elmType": "div",
        "style": {
          "padding": "30px"
        },
        "children": [
          {
            "elmType": "div",
            "txtContent": "Hello World"
          }
        ]
      }
    }
  }
}

Expected behavior

Hover over an element with customCardProps set to display a custom card.

@tecchan1107 tecchan1107 added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Dec 1, 2024
@tecchan1107
Copy link
Contributor Author

Related sample: vertical-mega-menu

@tecchan1107
Copy link
Contributor Author

As a test, I applied the JSON to the view formatting in the document library, and when I hovered over it, the custom card was displayed without any problems.

sample

@XueSheng-GIT
Copy link

XueSheng-GIT commented Dec 10, 2024

Probably related: #9868

If hover does not work at all, it helps most of the times to move the mouse to another list item and then back again to the previous hover area. But generally, hover is more or less broken with current list implementation!

@tpodugu-ms
Copy link

Thanks for reporting this. I will check with the team and update.

@VesaJuvonen VesaJuvonen added the Needs: Triage 🔍 Awaiting categorization and initial review. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

4 participants