-
Notifications
You must be signed in to change notification settings - Fork 301
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
Trigger on Mouse Down #89
Comments
Not currently, but I will add |
Ah thanks - waiting! |
So I decided to not increase the SelectBoxIt version number for this change, but mousedown and mouseup default events are now supported. Let me know if this works for you! |
I tried to make it work but may be I cannot really get it through. $(document).find("select").mousedown(function(e){
$(this).data("selectBoxIt").open();
}); |
Is there any reason you want to listen to the |
@gfranko Actually, mousedown would be a nice addition, as some people (myself included) use a dragging motion to open and select list items. The following works with Firefox native selects:
|
@who Very interesting, I had never used this behavior. Do you think this should be added to the default behavior or just be left as an extra feature that can be done programmatically through the SelectBoxIt API (like the way @pushpinderbagga was doing it) ? |
@gfranko I don't think it should be the default behavior, because exposing browser-specific idiosyncrasies might bring unintended consequences to existing implementations of SelectBoxIt. Perhaps a mode or setting should be added, and when it's on/enabled, would cause SelectBoxIt to have behavioral parity with regular selects, factoring in the context of the current browser. This setting could be called "useNativeBehavior", or something of that nature. Personally, I'd be happy to contribute to this feature, as I have become rather accustomed to the way FireFox handles selects and child options thereof. Cheers, |
@who That would be great! I might be a bit tricky to implement, but I am here to help if you need anything. |
Hello Frank, I don't know if this is exclusive but I've been using Firefox since ever and it triggers the select box to open on mouse down so I felt the click open to be a little delayed. I checked in IE too - it opens on mouse down. I just want it to open on mousedown - can we do it in some way? Thanks |
@pushpinderbagga I need to make a fix for it to work correctly, so I will update SelectBoxIt tonight. I'll let you know when you can start using it! |
@pushpinderbagga There are now two ways for you to trigger the drop down to open on
$("select").selectBoxIt({ customShowHideEvent: true });
$("select").mousedown(function(e){
$(this).data("selectBoxIt").open();
}); |
Is there any way to trigger the dropdown on mousedown?
The text was updated successfully, but these errors were encountered: