Skip to content

data attribute prefixed in popover #7

Description

@xbill82

Hi, I found an issue in the popover plugin.
In the plugin definition, a data variable is filled with $this.data('bs.popover');. Then, just below, a check is performed:
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
Which means: if no popover was instantiated before, then create a new one.

The issue in my prefixed code is that the data assignation was prefixed, like

$this.data('bs.tb-popover')

but the creation was not, like the following

if (!data) $this.data('bs.popover', (data = new Popover(this, options)))

which caused a new popover to be created on top of the previous one at every toggle.

I would be really glad to submit a pull request but I have no experience coding in python, and I have actually no opinion (nor any clue) about whether data attributes used by jQuery should be prefixed or not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions