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 · 1 comment
Open
2 of 9 tasks
Labels
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

1 participant