Popover JS config object overrides `data-bs-` attributes
Created by: daviddwmd
Prerequisites
-
I have searched for duplicate or closed issues -
I have validated any HTML to avoid common problems -
I have read the contributing guidelines
Describe the issue
The Bootstrap v5.2 documentation for Popovers says that the "content" option in the config object passed to the JS initialization provides "Default content value if data-bs-content attribute isn’t present." But when the data-bs-content attribute IS present, the Popover is still using the default from the JS config, and ignoring the data-bs-content. I'd like to use a function on most of my Popovers by default, but be able to override the default using the data attributes.
The issue is happening on lines 46-47 of util/config.js, where the _mergeConfigObj loads the data attributes, then the js config.
Per this StackOverflow item, this has been happening since v3: https://stackoverflow.com/questions/28593579/override-popover-option-parameter-with-data-attributes
Am I just misunderstanding the documentation? Shouldn't the HTML be a more specific case than the JS?
Reduced test cases
https://codepen.io/asleepypenguin/pen/eYrbBam
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
No response
What version of Bootstrap are you using?
v5.2.0