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

Error in event handler for "hidden::modal": "TypeError: Cannot read property 'template' of null" #1032

Closed
bigperson opened this issue Sep 11, 2017 · 6 comments
Assignees

Comments

@bigperson
Copy link

bigperson commented Sep 11, 2017

Hi. I use tooltips in modals:

My component:

<b-modal  :visible="showModal === 'addEditOrder'">
<loading v-if="loading"></loading>
<div  v-else>
       <span v-b-tooltip title="tooltip title" class="badge badge-warning">?</span>
</div>
</b-modal>

After change 'loading' variable on true, false and calling hide method for modal, i get the error:

[Vue warn]: Error in event handler for "hidden::modal": "TypeError: Cannot read property 'template' of null"

(found in <Root>)
warn @ vue.common.js?e881:481
handleError @ vue.common.js?e881:564
Vue.$emit @ vue.common.js?e881:2304
hide @ bootstrap-vue.esm.js?765b:1
boundFn @ vue.common.js?e881:185
visible @ bootstrap-vue.esm.js?765b:1
run @ vue.common.js?e881:2974
flushSchedulerQueue @ vue.common.js?e881:2726
(anonymous) @ vue.common.js?e881:703
nextTickHandler @ vue.common.js?e881:650
Promise resolved (async)
timerFunc @ vue.common.js?e881:665
queueNextTick @ vue.common.js?e881:713
queueWatcher @ vue.common.js?e881:2813
update @ vue.common.js?e881:2950
notify @ vue.common.js?e881:780
reactiveSetter @ vue.common.js?e881:1002
proxySetter @ vue.common.js?e881:3075
(anonymous) @ ModalEditOrder.vue?ae42:201
Promise resolved (async)
updateOrder @ ModalEditOrder.vue?ae42:200
boundFn @ vue.common.js?e881:185
beforeUpdateForm @ ModalEditOrder.vue?ae42:170
boundFn @ vue.common.js?e881:184
click @ ModalEditOrder.vue?1b53:330
invoker @ vue.common.js?e881:1816
vue.common.js?e881:568 TypeError: Cannot read property 'template' of null
    at ToolTip.getTipElement (bootstrap-vue.esm.js?765b:1)
    at ToolTip.forceHide (bootstrap-vue.esm.js?765b:1)
    at Vue$3.Vue.$emit (vue.common.js?e881:2302)
    at VueComponent.hide (bootstrap-vue.esm.js?765b:1)
    at VueComponent.boundFn [as hide] (vue.common.js?e881:185)
    at VueComponent.visible (bootstrap-vue.esm.js?765b:1)
    at Watcher.run (vue.common.js?e881:2974)
    at flushSchedulerQueue (vue.common.js?e881:2726)
    at Array.eval (vue.common.js?e881:703)
    at nextTickHandler (vue.common.js?e881:650)

Version 1.0.0. beta7

@tmorehouse
Copy link
Member

Thanks for the report.. We'll check into this.

@tmorehouse tmorehouse self-assigned this Sep 11, 2017
@tmorehouse
Copy link
Member

I've tried to mock this up, but I am not seeing the console error you are mentioning.

Could you provide a full code example (or JSFiddle) that can reproduce this issue?

@bigperson
Copy link
Author

bigperson commented Sep 11, 2017

Code example https://jsfiddle.net/7ztq8nzd/24/
Open console after hide modal

@tmorehouse
Copy link
Member

Interesting... In firefox this error does not show, but it does in Chrome.

@tmorehouse
Copy link
Member

PR #1024 may address this issue

tmorehouse added a commit that referenced this issue Sep 14, 2017
…side `v-if`'ed elements

Prevents illegal invocation errors when tooltip inside `v-if`'ed elements.

Fixes issue  #1032
tmorehouse added a commit that referenced this issue Sep 14, 2017
…-if elements (#1057)

* fix(ttoltip popover): prevnt llegal invocation errors when tooltip inside `v-if`'ed elements

Prevents illegal invocation errors when tooltip inside `v-if`'ed elements.

Fixes issue  #1032

* Update tooltip.js
@tmorehouse
Copy link
Member

This should be fixed in latest release.

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