Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #7086
Closed
Open
Issue created Feb 26, 2013 by Administrator@rootContributor

Popover data attributes ignored when using selector option

Created by: neilgoodman

I have setup a web application to use the data-api of the popover plugin:

$(function () {
        $('body').popover({
            selector: '[data-toggle="popover"]'
        });
});

My HTML looks like this for the popover:

<a class="btn" data-toggle="popover" data-placement="bottom" data-html="true" data-content="&lt;strong&gt;test&lt;/strong&gt;">Popover Test</a>

Now when I click the button, the popover does show up, but none of the data attributes are being used. This was not the case in 2.2. I think the issue is on this line in bootstrap-tooltip.js:

https://github.com/twitter/bootstrap/blob/v2.3.0/js/bootstrap-tooltip.js#L70

A possible fix could be:

options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())

Another area this could be fixed:

https://github.com/twitter/bootstrap/blob/v2.3.0/js/bootstrap-tooltip.js#L64 https://github.com/twitter/bootstrap/blob/v2.3.0/js/bootstrap-tooltip.js#L83 https://github.com/twitter/bootstrap/blob/v2.3.0/js/bootstrap-tooltip.js#L95

Maybe get rid of the _options property all together? Not sure, so that's why I'm posting this as an issue.

Assignee
Assign to
Time tracking