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

Can't disable classes #253

Closed
dimensi opened this issue Apr 17, 2017 · 2 comments · Fixed by #329
Closed

Can't disable classes #253

dimensi opened this issue Apr 17, 2017 · 2 comments · Fixed by #329
Labels

Comments

@dimensi
Copy link

dimensi commented Apr 17, 2017

Hi, I'm trying to disable classes that I do not need.

new Tether({
                element: this.$el,
                target: this.target,
                attachment: 'top left',
                targetAttachment: 'bottom left',
                constraints: [
                    {
                        to: 'scrollParent',
                        attachment: 'together'
                    }
                ],
                classPrefix: 'popup',
                classes: {
                    element: false,
                    target: false,
                    enabled: false
                }
            });

But everything is useless, the classes are only renamed, but not switched off.

@shmax
Copy link

shmax commented Apr 18, 2017

I was just about to report this, myself. The offending bit of code seems to be here. A truthy check is done on classes[key], but if it's been set to false as suggested in the docs, then it simply falls down to the next check for this.options.classPrefix, and if that fails, it just returns the key. There is no path that results in no class being added. Or am I missing something?

@Cryrivers
Copy link

Had the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants