revsystems / jQuery-SelectBox

A modern replacement for the traditional select element. Increases flexibility and stylability.
http://plugins.jquery.com/project/jquery-sb
Other
72 stars 16 forks source link

Selectbox not closing when leaving with tab key #21

Closed tvdeyen closed 13 years ago

tvdeyen commented 13 years ago

If I leave a .sb() selectbox with hitting the tab key than the selectbox does not close it self. It stays open.

tvdeyen commented 13 years ago

To be more specific:

Leaving to another selectbox works, but not with input fields.

I pasted a demo here:

https://gist.github.com/868991

tvdeyen commented 13 years ago

I investigated a little bit more.

You are bluring the selectbox only if you focus another selectbox. Shouldn't the selectbox be blured after it loses focus? (it blures btw ;)

This causes some very strange side effects in my application.

Is there a reason you are doing this. I try to fix this in my fork. But first I have to check you event system. Maybe you have some hints for me.

revsystems commented 13 years ago

I know exactly what you're talking about and I had tons of issues fixing it, mostly dealing with performance. I will first try your changes to see if that fixes it.

Thanks

revsystems commented 13 years ago

I tried coming up with a fix for this today, but I don't think the way I'm managing blur/focus (utilizing the original select elements) allows it to work correctly. Need to think some more on it to see if I can get a clever solution, or if refactoring focus management is needed.

revsystems commented 13 years ago

I just pushed a change that I think should fix this. Let me know if it's working for you.

revsystems commented 13 years ago

Haven't heard anything, so I'm closing this...

tvdeyen commented 13 years ago

Sorry hadn't time to check.

I'll post a new one if I find problems.