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

Popover content option (passed as function) documentation issue #40571

Open
3 tasks done
stuntsman opened this issue Jun 20, 2024 · 2 comments
Open
3 tasks done

Popover content option (passed as function) documentation issue #40571

stuntsman opened this issue Jun 20, 2024 · 2 comments
Labels

Comments

@stuntsman
Copy link

Prerequisites

Describe the issue

While migrating from v4 to v5, we've found that our content function is not working. We use BS with jQuery.

The v5.3 documentation includes this explanation for popover content option:

"The popover’s text content. If a function is given, it will be called with its this reference set to the element that the popover is attached to."

However, relying on "this" reference doesn't work as it worked earlier. Instead, the function now receives the element in question as function parameter.

I think that the documentation needs an update, possibly the migration guide too.

Reduced test cases

https://codepen.io/stuntsman/pen/GRaQaPg?editors=1111

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Opera

What version of Bootstrap are you using?

v5.3

@julien-deramond
Copy link
Member

Thanks for reporting an issue @stuntsman
Could you please check that it's not a duplicate of #38720?

@stuntsman
Copy link
Author

The root cause in both tickets is the change of the implementation - I just thought that the change was intentional and therefore I didn't treat the implementation change as a bug, but as a change that needs an updated documentation.

If the solution was to restore the original behaviour, then there's no need to update documentation and this ticket is invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants