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

multiple opened selects are possible. #5

Closed
alxpolyakov opened this issue Apr 28, 2013 · 1 comment
Closed

multiple opened selects are possible. #5

alxpolyakov opened this issue Apr 28, 2013 · 1 comment

Comments

@alxpolyakov
Copy link

on autoHide=true select hides on mouse click. I offer something like this:

    // Auto-hide the dropdown menu on mouse leave
    if (this.options.autoHide) {
        this.ul.addEvent('mouseleave', function(e){
            if (!this.shown) return;
            this.hide();
        }.bind(this));
        this.div.addEvent('mouseleave', function(e){
            if (!this.shown) return;
            this.hide();
        }.bind(this));
    }
@lorenzos
Copy link
Owner

I disagree on your your solution: "normal" selects (I mean, the ones rendered by default by browser) does not disappear on mouse leave (it should be very unhandy!), but only when I click outside them.

Anyway I don't understand the problem, about multiple opened selects. If you use autoHide: true, selects are correctly "closed" when you click another one: you can't open many of them.

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

No branches or pull requests

2 participants