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

TypeError in Tooltip when the slot content isn't an element #313

Closed
KuroThing opened this issue May 1, 2017 · 1 comment
Closed

TypeError in Tooltip when the slot content isn't an element #313

KuroThing opened this issue May 1, 2017 · 1 comment

Comments

@KuroThing
Copy link

The error as per chrome: TypeError: Cannot read property 'addEventListener' of undefined
The error as per firefox: TypeError: e._trigger is undefined

A jsfiddle that reproduces the error, just check your browsers console after running the example.

From what i can gather, it appears the problem stems from the fact that this._trigger assumes that the child is a html element, and it continues until addListener is called, which will then throw an error.

If this is the intended behaviour, could this please be documented somewhere on at least Tooltip, and also Popover if it is also impacted by this along with a sanity check to see if the child is a html element and a custom error being thrown with an improved error message that clearly indicates the problem.

@pi0
Copy link
Member

pi0 commented May 3, 2017

@KuroThing In next release it is possible without wrapping inside <span> :
<b-tooltip content="Foo">Bar Baz</b-tooltip>

@pi0 pi0 closed this as completed May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants