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

Console error while using BVTooltips in IE11 - Object doesn't support property or method 'contains' #4074

Closed
ekilin opened this issue Sep 11, 2019 · 4 comments · Fixed by #4075, mariazevedo88/hash-generator-js#4 or mariazevedo88/hash-generator-js#11

Comments

@ekilin
Copy link

commented Sep 11, 2019

Error while using tooltips

In IE11 "document.contains" is not supported. Should be replaced with "document.body.contains". Could you please correct this?

Code snippet

In bv-tooltip.js the following code is causing the console error:

    this.$nextTick(() => {
      const target = this.getTarget()
      if (target && document.contains(target)) {
        // Copy the parent's scoped style attribute
        this.scopeId = getScopId(this.$parent)
        // Set up all trigger handlers and listeners
        this.listen()
      } else {
        /* istanbul ignore next */
        warn(`${this.templateType} unable to find target element in document`)
      }
    })

Versions

Libraries:

  • BootstrapVue: 2.0.0
  • Bootstrap: 4.3.1
  • Vue: 2.5.2

Environment:

  • Browser: IE11
@tmorehouse

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Thanks for finding this... we should have it fixed in v2.0.1 (hopefully coming out later this week)

@ekilin

This comment has been minimized.

Copy link
Author

commented Sep 11, 2019

Thanks a lot!

tmorehouse added a commit that referenced this issue Sep 11, 2019
…r IE11 support (fixes #4074)
@ReneS1991

This comment has been minimized.

Copy link

commented Sep 11, 2019

Great to hear a fix will be included soon. We use it in one of our projects for which we have a release next week so would be more than great if v2.0.1 can be released this week 😄

jackmu95 added a commit that referenced this issue Sep 11, 2019
…r IE11 support (fixes #4074) (#4075)

* fix(tooltip, popover): check `document.body` instead of `document` for IE11 support (fixes #4074)

* lint
@ReneS1991

This comment has been minimized.

Copy link

commented Sep 16, 2019

All worked in 2.0.1, thanks! 😄 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.