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

Clean body click event on dispose #103

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Conversation

ulladimil
Copy link

@ulladimil ulladimil commented Mar 18, 2019

Hi, I use bootstrap-confirmation with marionette.js, and my component is as follows:

import { View } from 'backbone.marionette';

class MyView extends View {
        
    onRender() {
        this.$el.find('[data-toggle="confirmation"]').confirmation({
            ...
        });
    }

    onBeforeDestroy() {
        this.$el.find('[data-toggle="confirmation"]').confirmation('dispose');
    }
}

As a result of user interaction or through a websocket view may be rerender. Will be called view destroy and confirm dispose methods, if at this time the confirmation dialog was opened body click event will live on:

Screenshot from 2019-03-18 15-50-38

@mistic100
Copy link
Owner

Thank you.
Can you remove all dist files form the PR please ?

@mistic100 mistic100 merged commit 88fd2bd into mistic100:master Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants